Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mrbeardad opened this issue Dec 10, 2023 · 6 comments
Closed
Assignees
Labels
Area-AtlasEngine Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-3 A description (P3) Product-Terminal The new Windows Terminal.

Comments

@mrbeardad
Copy link

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

@mrbeardad mrbeardad added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Dec 10, 2023
@DHowett
Copy link
Member

DHowett commented 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.

@lhecker lhecker self-assigned this Dec 11, 2023
@j4james
Copy link
Collaborator

j4james commented Dec 11, 2023

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

@mrbeardad
Copy link
Author

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

@DHowett
Copy link
Member

DHowett commented 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 #16451 (comment)), 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.

@lhecker
Copy link
Member

lhecker commented 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 lhecker added Product-Terminal The new Windows Terminal. Priority-3 A description (P3) Area-AtlasEngine labels Dec 12, 2023
@lhecker lhecker added this to the Terminal v1.20 milestone Dec 12, 2023
@carlos-zamora carlos-zamora removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Dec 13, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Tag-Fix Doesn't match tag requirements label Dec 13, 2023
@zadjii-msft zadjii-msft changed the title bug: \u25ef rendered too big. Our box drawing character range is too broad (was: \u25ef rendered too big) Jan 31, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Tag-Fix Doesn't match tag requirements label Jan 31, 2024
@lhecker
Copy link
Member

lhecker commented Mar 28, 2024

Oh right, this was fixed with #16729.

@lhecker lhecker closed this as completed Mar 28, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Tag-Fix Doesn't match tag requirements label Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-AtlasEngine Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-3 A description (P3) Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

6 participants