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

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

Originally created by @SivanagBalla on GitHub (May 9, 2024).

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

Originally created by @SivanagBalla on GitHub (May 9, 2024). ### 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](https://github.com/microsoft/terminal/assets/19350704/82431238-4c75-41dc-b42c-bb39b96ff62a) ![image](https://github.com/microsoft/terminal/assets/19350704/b945465e-c283-49eb-afbe-b06ab159c8f7) ### 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](https://github.com/microsoft/terminal/assets/19350704/11d42ca3-f7a3-40ad-8a2e-79720530f4f1) ![image](https://github.com/microsoft/terminal/assets/19350704/133cb26a-3a4d-44f6-ba69-6c7dae973518) With Graphics API: Direct2D. The result is better but not same as 1.19.11213.0 ![image](https://github.com/microsoft/terminal/assets/19350704/e65c75bc-190a-4f78-9c1b-55eff7d04d44) ![image](https://github.com/microsoft/terminal/assets/19350704/dd0d6d45-e0f9-4e9a-ac35-0a9b248ad62d) In full screen mode, it get a bit worse ![image](https://github.com/microsoft/terminal/assets/19350704/7ce501ff-9ca5-463c-a81c-a333b45b3abf)
Author
Owner

@github-actions[bot] commented on GitHub (May 9, 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 9, 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: - [AtlasEngine rendering wide Nerd Font glyphs incorrectly (#14022)](https://github.com/microsoft/terminal/issues/14022), similarity score: 0.84 - [1.16 Preview: Incorrect Nerd Font rendering: double-sized characters are reduced (#13988)](https://github.com/microsoft/terminal/issues/13988), similarity score: 0.81 - [Some glyphs in Nerd Fonts are rendered with wrong widths (#11769)](https://github.com/microsoft/terminal/issues/11769), similarity score: 0.78 - [Bad rendering of icons (nerd fonts) with atlas rendering (#14074)](https://github.com/microsoft/terminal/issues/14074), similarity score: 0.77 - [Incorrect full-width char rendering (#17016)](https://github.com/microsoft/terminal/issues/17016), similarity score: 0.76 > Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Author
Owner

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

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?

@lhecker commented on GitHub (May 10, 2024): 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?
Author
Owner

@SivanagBalla commented on GitHub (May 10, 2024):

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

@SivanagBalla commented on GitHub (May 10, 2024): 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](https://github.com/microsoft/terminal/files/15270470/UbuntuMono.Nerd.Font.zip)
Author
Owner

@zadjii-msft commented on GitHub (May 10, 2024):

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

  • This is by-design, the PL glyphs are supposed to be single-wide now, and the terminal is correctly rendering them as such. Users can always opt-out of the Terminal doing this with "font.builtinGlyphs": false...
  • ... though, with "font.builtinGlyphs": false, we still should probably render these a little better
  • alternatively, I'm not sure if we can check the font ahead of time, and manually scale our PL drawing to the same width the font expects them to be
@zadjii-msft commented on GitHub (May 10, 2024): There's a couple ways I could see us taking this: * This is by-design, the PL glyphs are supposed to be single-wide now, and the terminal is correctly rendering them as such. Users can always opt-out of the Terminal doing this with `"font.builtinGlyphs": false`... * ... though, with `"font.builtinGlyphs": false`, we still should probably render these a little better * alternatively, I'm not sure if we can check the font ahead of time, and manually scale our PL drawing to the same width the font expects them to be
Author
Owner

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

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:

  • Newer version of NF have these glyphs as narrow.
  • Adjusting the width of builtin glyphs to match the font would break their biggest strength of being fully "gap-less".
  • Adjusting the size of font glyphs in the past has repeatedly proven itself to be very error prone. Adjusting the vertical/horizontal alignment is less bad, but still somewhat error prone. It should be reserved to situations where there aren't any alternatives.

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

@lhecker commented on GitHub (May 10, 2024): > Users can always opt-out of the Terminal doing this with `"font.builtinGlyphs": false`... FYI you can also find the setting here: ![image](https://github.com/microsoft/terminal/assets/2256941/56c6bdbe-dbab-4c67-aef5-652715b29966) I think we should consider closing this as "by design" for the following reasons: * Newer version of NF have these glyphs as narrow. * Adjusting the width of builtin glyphs to match the font would break their biggest strength of being fully "gap-less". * Adjusting the size of font glyphs in the past has repeatedly proven itself to be very error prone. Adjusting the vertical/horizontal alignment is less bad, but still somewhat error prone. It should be reserved to situations where there aren't any alternatives. @SivanagBalla Is there a reason why you don't want to use a newer Ubuntu Mono NF version?
Author
Owner

@SivanagBalla commented on GitHub (May 10, 2024):

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?

@SivanagBalla commented on GitHub (May 10, 2024): 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?
Author
Owner

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

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.

@lhecker commented on GitHub (May 10, 2024): No, it simply disables these builtin glyphs: ![image](https://github.com/microsoft/terminal/assets/2256941/ce66a2c5-a066-4467-a2b7-8281e6d15843) The benefit of them being builtin is that they're "pixel perfect", unlike the corresponding glyphs in a font.
Author
Owner

@zadjii-msft commented on GitHub (May 10, 2024):

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

@zadjii-msft commented on GitHub (May 10, 2024): 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
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21668