microsoft / terminal

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

Double wide nerd font glyphs are rendered incorrectly in 1.21 #17228

Closed SivanagBalla closed 5 months ago

SivanagBalla commented 5 months ago

Windows Terminal version

1.21.1272.0

Windows build number

10.0.22631

Other Software

No response

Steps to reproduce

Use UbuntuMono Nerd Font and configure some double wide character in status bar or print them in terminal

Issue seen with Latest Windows Terminal Preview version: 1.21.1272.0

Expected Behavior

Double wide fonts should be rendered properly like below

In Windows Terminal version: 1.19.11213.0 (Atlas Engine is enabled)

image image

Actual Behavior

In Windows Terminal Preview version: 1.21.1272.0 With Graphics API: Direct3D 11 (Same result wtih Graphics API: Automatic) - some fonts are good but some are not

image image

With Graphics API: Direct2D. The result is better but not same as 1.19.11213.0 image image

In full screen mode, it get a bit worse image

github-actions[bot] commented 5 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.

lhecker commented 5 months ago

Huh, weird. I thought those triangle glyphs were narrow (1 cell wide)? I just installed the latest version of Ubuntu Mono NF (version 0.80) and U+E0B8, U+E0BA, U+E0BC, and U+E0BE are all narrow for me.

What Ubuntu Mono font are you using? NF (UbuntuMonoNerdFont-Regular.ttf), NFM (UbuntuMonoNerdFontMono-Regular.ttf), or NFP (UbuntuMonoNerdFontPropo-Regular.ttf)?

Can you figure out what codepoints your status line uses, or otherwise give me a printf command (or similar) that allows me to reproduce the issue locally?

SivanagBalla commented 5 months ago

I'm using an earlier verion of Ubuntu Mono NF which i downloaded from https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/UbuntuMono/Regular/UbuntuMonoNerdFont-Regular.ttf This version has those characters(U+E0B8, U+E0BA, U+E0BC, and U+E0BE) to be double wide.

Sometime down the line (around year back i believe), they (ryanoasis/nerd-fonts) updated those characters to be narrow. So the latest version still have them as narrow.

I kept the older version of font file. Here it is. If you want to try this, you may want to remove the already installed one. UbuntuMono Nerd Font.zip

zadjii-msft commented 5 months ago

There's a couple ways I could see us taking this:

lhecker commented 5 months ago

Users can always opt-out of the Terminal doing this with "font.builtinGlyphs": false...

FYI you can also find the setting here: image

I think we should consider closing this as "by design" for the following reasons:

@SivanagBalla Is there a reason why you don't want to use a newer Ubuntu Mono NF version?

SivanagBalla commented 5 months ago

I liked the older double wide verison of these characters and so i kept it. Anyway, turning off Builtin Glyphs worked. This is good enough for me. But does this option have any other side effects?

lhecker commented 5 months ago

No, it simply disables these builtin glyphs: image

The benefit of them being builtin is that they're "pixel perfect", unlike the corresponding glyphs in a font.

zadjii-msft commented 5 months ago

Yea I second closing by design. If disabling the builtin glyphs works for you, that's probably the best we'll be able to do in the general case.

Thanks for following up! TIL that there was a version of NF where those glyphs were double-wide