Our box drawing character range is too broad (was: \u25ef rendered too big) #20976

Closed
opened 2026-01-31 07:29:27 +00:00 by claunia · 6 comments
Owner

Originally created by @mrbeardad on GitHub (Dec 10, 2023).

Originally assigned to: @lhecker on GitHub.

Windows Terminal version

1.18.3181.0

Windows build number

10.0.22621.0

Other Software

lazygit v0.40.2
nerdfont v3.1.1 SauceCodePro

Steps to reproduce

\u25ef ->

Expected Behavior

render correctly when turn off atlas

image

Actual Behavior

image

Originally created by @mrbeardad on GitHub (Dec 10, 2023). Originally assigned to: @lhecker on GitHub. ### Windows Terminal version 1.18.3181.0 ### Windows build number 10.0.22621.0 ### Other Software lazygit v0.40.2 nerdfont v3.1.1 [SauceCodePro](https://github.com/ryanoasis/nerd-fonts/releases/download/v3.1.1/SourceCodePro.zip) ### Steps to reproduce `\u25ef` -> `◯` ### Expected Behavior render correctly when turn off `atlas` ![image](https://github.com/microsoft/terminal/assets/54128430/da5e1202-893d-40cb-bacc-6417da9c6391) ### Actual Behavior ![image](https://github.com/microsoft/terminal/assets/54128430/96e13b7e-5aa1-42fe-98ca-89cbe660d825)
Author
Owner

@DHowett commented on GitHub (Dec 11, 2023):

This is a two-part problem.

  1. A font authoring issue. There is no glyph in "Sauce Code Pro" for U+25EF.
  2. The engine cuts it off instead of letting it extend outside its boundary. @lhecker, Atlas Engine believes all glyphs in range U+2500 to U+25FF to be block elements, but in truth the box drawing and block elements blocks only extend from U+2500 to U+259F. The block after that is "geometric shapes".

Even if we fix 2, the circle will not look ideal since it is much bigger than a single monospaced character cell. If you want it to look right, choose a more complete font.

@DHowett commented on GitHub (Dec 11, 2023): This is a two-part problem. 1. A font authoring issue. There is no glyph in "Sauce Code Pro" for `U+25EF`. 2. The engine cuts it off instead of letting it extend outside its boundary. @lhecker, Atlas Engine believes all glyphs in range `U+2500` to `U+25FF` to be block elements, but in truth the box drawing and block elements blocks only extend from `U+2500` to `U+259F`. The block after that is "geometric shapes". Even if we fix 2, the circle will not look ideal since it is much bigger than a single monospaced character cell. If you want it to look right, choose a more complete font.
Author
Owner

@j4james commented on GitHub (Dec 11, 2023):

Font fallback configuration could possibly also help with scenarios like this (#2664).

@j4james commented on GitHub (Dec 11, 2023): Font fallback configuration could possibly also help with scenarios like this (#2664).
Author
Owner

@mrbeardad commented on GitHub (Dec 12, 2023):

Another question, does atlas always cut glyph off rather than scale it?

@mrbeardad commented on GitHub (Dec 12, 2023): Another question, does atlas always cut glyph off rather than scale it?
Author
Owner

@DHowett commented on GitHub (Dec 12, 2023):

Font fallback configuration could possibly also help with scenarios like this (#2664).

Absolutely!

Another question, does atlas always cut glyph off rather than scale it?

No. For normal glyphs (see bug 2 in https://github.com/microsoft/terminal/issues/16451#issuecomment-1850620815), Atlas always allows the glyph to extend out of bounds. It is incorrect to scale glyphs down, as we have seen with characters from non-en-US languages and italic or bold text.

@DHowett commented on GitHub (Dec 12, 2023): > Font fallback configuration could possibly also help with scenarios like this (#2664). Absolutely! > Another question, does atlas always cut glyph off rather than scale it? No. For normal glyphs (see bug 2 in https://github.com/microsoft/terminal/issues/16451#issuecomment-1850620815), Atlas _always_ allows the glyph to extend out of bounds. It is incorrect to scale glyphs down, as we have seen with characters from non-en-US languages and italic or bold text.
Author
Owner

@lhecker commented on GitHub (Dec 12, 2023):

I'd like to leave this issue open to track the U+259F vs. U+25FF you mentioned, Dustin.

But that aside, I also don't personally wish to specifically address the ◯ glyph right now. Scaling glyphs down, as we've done with the old text renderer, has lead to all sorts of similarly subtle bugs over the years and I don't really want to reintroduce them. I'd rather implement customized font fallback in a future Terminal version.

@lhecker commented on GitHub (Dec 12, 2023): I'd like to leave this issue open to track the U+259F vs. U+25FF you mentioned, Dustin. But that aside, I also don't personally wish to specifically address the ◯ glyph right now. Scaling glyphs down, as we've done with the old text renderer, has lead to all sorts of similarly subtle bugs over the years and I don't really want to reintroduce them. I'd rather implement customized font fallback in a future Terminal version.
Author
Owner

@lhecker commented on GitHub (Mar 28, 2024):

Oh right, this was fixed with #16729.

@lhecker commented on GitHub (Mar 28, 2024): Oh right, this was fixed with #16729.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#20976