microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
95.75k stars 8.33k forks source link

Cascadia Code arrow segments not displaying correctly #17217

Closed riverar closed 6 months ago

riverar commented 6 months ago

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

github-actions[bot] commented 6 months ago

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.

DHowett commented 6 months ago

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

Image

riverar commented 6 months ago

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

image

lhecker commented 6 months ago

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:

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.

riverar commented 6 months ago

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.

DHowett commented 6 months ago

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?

riverar commented 6 months ago

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

DHowett commented 6 months ago

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!