terminal
terminal copied to clipboard
Our box drawing character range is too broad (was: `\u25ef` rendered too big)
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
Actual Behavior
This is a two-part problem.
- A font authoring issue. There is no glyph in "Sauce Code Pro" for
U+25EF. - The engine cuts it off instead of letting it extend outside its boundary. @lhecker, Atlas Engine believes all glyphs in range
U+2500toU+25FFto be block elements, but in truth the box drawing and block elements blocks only extend fromU+2500toU+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.
Font fallback configuration could possibly also help with scenarios like this (#2664).
Another question, does atlas always cut glyph off rather than scale it?
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.
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.
Oh right, this was fixed with #16729.