Cascadia Code arrow segments not displaying correctly #21653

Closed
opened 2026-01-31 07:51:01 +00:00 by claunia · 8 comments
Owner

Originally created by @riverar on GitHub (May 8, 2024).

Windows Terminal version

1.21.1272.0

Windows build number

10.0.26200.5001

Other Software

No response

Steps to reproduce

  1. Create a text file on your desktop with the following content:

    Howdy! 🤠
    
    =>
    
    ==>
    
    ===>
    
    ====>
    
    =====>
    
    ======>
    
    =======>
    
    ========>
    
    =========>
    
    ==========>
    
    ===========>
    
    ============>
    
    =============>
    
    ==============>
    
  2. Launch Terminal app

  3. Display content in Terminal (e.g., Get-Content test.txt)

  4. Observe arrow segments are not connected together cleanly

Expected Behavior

Arrows with cleanly connected segments (https://github.com/microsoft/cascadia-code/blob/main/images/arrow_support.png)

Actual Behavior

Arrows without cleanly joined segments

image

Originally created by @riverar on GitHub (May 8, 2024). ### Windows Terminal version 1.21.1272.0 ### Windows build number 10.0.26200.5001 ### Other Software _No response_ ### Steps to reproduce 1. Create a text file on your desktop with the following content: ``` Howdy! 🤠 => ==> ===> ====> =====> ======> =======> ========> =========> ==========> ===========> ============> =============> ==============> ``` 3. Launch Terminal app 4. Display content in Terminal (e.g., `Get-Content test.txt`) 5. Observe arrow segments are not connected together cleanly ### Expected Behavior Arrows with cleanly connected segments (https://github.com/microsoft/cascadia-code/blob/main/images/arrow_support.png) ### Actual Behavior Arrows without cleanly joined segments ![image](https://github.com/microsoft/terminal/assets/475132/e31a0ccb-191b-4f69-a75f-1e3d954df4db)
claunia added the Resolution-By-DesignNeeds-TriageIssue-Bug labels 2026-01-31 07:51:02 +00:00
Author
Owner

@github-actions[bot] commented on GitHub (May 8, 2024):

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@github-actions[bot] commented on GitHub (May 8, 2024): Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! ### Closed similar issues: - [Arrow ligature does not render consistently in Windows Terminal (#5158)](https://github.com/microsoft/terminal/issues/5158), similarity score: 0.80 - [Terminal doesn't render light arc characters well (#6708)](https://github.com/microsoft/terminal/issues/6708), similarity score: 0.76 - [Certain terminal characters not rendering correctly (#15934)](https://github.com/microsoft/terminal/issues/15934), similarity score: 0.76 - [Box drawing characters contain gaps when viewed in Windows Terminal (#14654)](https://github.com/microsoft/terminal/issues/14654), similarity score: 0.75 > Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Author
Owner

@DHowett commented on GitHub (May 8, 2024):

Unfortunately, this is all down to how the font is designed. Even Chromium shows these overlap artifacts!

Image

@DHowett commented on GitHub (May 8, 2024): Unfortunately, this is all down to how the font is designed. Even Chromium shows these overlap artifacts! ![Image](https://github.com/microsoft/terminal/assets/189190/91d46ee4-eca6-497b-99b5-5362be192c16)
Author
Owner

@riverar commented on GitHub (May 8, 2024):

Note: This doesn't appear to occur at other sizes. Will open a bug on Cascadia, thanks @DHowett

image

@riverar commented on GitHub (May 8, 2024): Note: This doesn't appear to occur at other sizes. Will open a bug on Cascadia, thanks @DHowett ![image](https://github.com/microsoft/terminal/assets/475132/541cf889-7475-4ff2-8768-009711330ad0)
Author
Owner

@lhecker commented on GitHub (May 8, 2024):

Ah, you're too fast! I was meaning to respond. 😅
I'm not sure whether the overlaps can be solved in the font at all. Maybe to a certain extent by having unique glyphs for every length of the ligature? ...but certainly not for the general case like above.

It is theoretically solvable in the text renderer. There are two approaches:

  • Blend all glyphs in the viewport in pure grayscale together first, then colorize them cell-by-cell into the final image. This approach is simple but not particularly elegant and may not be very power efficient as it requires 3 passes instead of 1 (clear target, blend glyphs, blend glyphs with background). That's probably what we should try first and see how it performs. Maybe it's alright!
  • Use a compute shader. This gives us complete freedom to use loops and branches per pixel. We could blend glyphs in a loop, then use branches to add underlines, flags to add selection overlays, etc. This is what I'd like to do, but it's probably something we should only try after the former, because compute shaders are only well supported by modern hardware.

I think it's fine for this issue to stay closed, but I think I'll finally open an issue for this idea. We may never get to it, but this does come up from time to time.

P.S.: If you open the settings.json file you can change the "cellWidth" in the "font" object. It supports basic CSS line-height units: 1.2, 120%, 1.2px, 1.2pt, 1.2ch.

@lhecker commented on GitHub (May 8, 2024): Ah, you're too fast! I was meaning to respond. 😅 I'm not sure whether the overlaps can be solved in the font at all. Maybe to a certain extent by having unique glyphs for every length of the ligature? ...but certainly not for the general case like above. It is theoretically solvable in the text renderer. There are two approaches: * Blend all glyphs in the viewport in pure grayscale together first, then colorize them cell-by-cell into the final image. This approach is simple but not particularly elegant and may not be very power efficient as it requires 3 passes instead of 1 (clear target, blend glyphs, blend glyphs with background). That's probably what we should try first and see how it performs. Maybe it's alright! * Use a compute shader. This gives us complete freedom to use loops and branches per pixel. We could blend glyphs in a loop, then use branches to add underlines, flags to add selection overlays, etc. This is what I'd like to do, but it's probably something we should only try after the former, because compute shaders are only well supported by modern hardware. I think it's fine for this issue to stay closed, but I think I'll finally open an issue for this idea. We may never get to it, but this does come up from time to time. P.S.: If you open the settings.json file you can change the `"cellWidth"` in the `"font"` object. It supports basic CSS `line-height` units: `1.2`, `120%`, `1.2px`, `1.2pt`, `1.2ch`.
Author
Owner

@riverar commented on GitHub (May 8, 2024):

I think we should identify what the Cascadia Code folks need to do to fix the font (linked issue above) rather than add workarounds to Terminal.

@riverar commented on GitHub (May 8, 2024): I think we should identify what the Cascadia Code folks need to do to fix the font (linked issue above) rather than add workarounds to Terminal.
Author
Owner

@DHowett commented on GitHub (May 9, 2024):

It's not just Cascadia, and it's not just arrow ligatures. Lots of people have the opposite of the other experience you reported, where box drawing glyphs overlap and look bad. Yes, we could track down and fix every font. That would be prohibitively expensive in the long term.

There are always rasterization improvements that we could make.

Why not take a "yes, and" approach?

@DHowett commented on GitHub (May 9, 2024): It's not just Cascadia, and it's not just arrow ligatures. Lots of people have the opposite of the other experience you reported, where box drawing glyphs overlap and look bad. Yes, we could track down and fix every font. That would be prohibitively expensive in the long term. There are always rasterization improvements that we could make. Why not take a "yes, and" approach?
Author
Owner

@riverar commented on GitHub (May 9, 2024):

I'm okay with that, but you closed the issue blaming the font. So do we re-open this issue as an enhancement perhaps?

@riverar commented on GitHub (May 9, 2024): I'm okay with that, but you closed the issue blaming the font. So do we re-open this issue as an enhancement perhaps?
Author
Owner

@DHowett commented on GitHub (May 9, 2024):

I think it's fine for this issue to stay closed, but I think I'll finally open an issue for this idea. We may never get to it, but this does come up from time to time.

We'll track it as a separate issue. Thanks!

@DHowett commented on GitHub (May 9, 2024): > I think it's fine for this issue to stay closed, but I think I'll finally open an issue for this idea. We may never get to it, but this does come up from time to time. We'll track it as a separate issue. Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21653