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

Rendering of some escape codes are broken on some fonts #14877

Closed
HarukaMa opened this issue Feb 19, 2023 · 4 comments · Fixed by #14959
Closed

Rendering of some escape codes are broken on some fonts #14877

HarukaMa opened this issue Feb 19, 2023 · 4 comments · Fixed by #14959
Assignees
Labels
Area-AtlasEngine In-PR This issue has a related PR Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-2 A description (P2) Product-Terminal The new Windows Terminal.

Comments

@HarukaMa
Copy link

Windows Terminal version

1.16.10261.0, also main branch

Windows build number

10.0.19044.2364

Other Software

Most TUI programs

Steps to reproduce

The screenshot below uses make menuconfig on Linux kernel source and tool aptitude, but many TUI applications show this behavior as well. Try using some with specific fonts and you will spot it.

Expected Behavior

Might be the most ambiguous issue title I've written in a while, but I'm not quite sure what's causing it. I'll explain below.

(Warning, lots of screenshots)

When using common monospaced fonts, the rendering is fine:

Consolas:
image

Lucida Console:
image

and a third-party one:

MxPlus IBM VGA font:
image

Actual Behavior

However, when using some fonts (didn't find out the specifics here), the rendering is borked. Notice that the checkboxes are not aligned anymore, some characters are missing, and the window borders are broken:

PC-98 font:
image

That's a third-party font, however some standard fonts are showing this as well:

SimHei:
image

MS Gothic:
image

Tried with AtlasEngine both on and off and nothing changed (it didn't need a restart right?).

@HarukaMa HarukaMa 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 Feb 19, 2023
@HarukaMa
Copy link
Author

Forgot about the aptitude example, but it's like this:
image

@zadjii-msft
Copy link
Member

Tried with AtlasEngine both on and off and nothing changed (it didn't need a restart right?).

FWIW it absolutely does require a restart of that tab, unfortunately. One of the few settings that can't hot-reload. Double checking these results with it both enabled and disabled might help point at the right root cause.

I'm sure there's a dupe laying around that @lhecker can find. Probably one for each of the renderers 😅

@zadjii-msft zadjii-msft added Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Feb 20, 2023
@HarukaMa
Copy link
Author

Just tried and the rendering is broken on both situations:

AtlasEngine off:
image

AtlasEngine on:
image

Also it might be a good idea to add a description below to indicate that this specific setting needs a restart (or a new tab) to take effect:
image

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Feb 20, 2023
@lhecker lhecker self-assigned this Feb 20, 2023
@carlos-zamora carlos-zamora added Product-Terminal The new Windows Terminal. Priority-2 A description (P2) and removed Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Feb 22, 2023
@carlos-zamora carlos-zamora added this to the Terminal v1.18 milestone Feb 22, 2023
@carlos-zamora carlos-zamora removed the Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues label Feb 22, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Tag-Fix Doesn't match tag requirements label Feb 22, 2023
@lhecker
Copy link
Member

lhecker commented Mar 6, 2023

I'm about to open a PR which improves the situation around such box drawing characters up to the point, where we draw to the best capabilities of the font you've chosen. If the font doesn't have proper box drawing characters, they'll look broken, because that's what the font tells us to do. This is for instance the case for MS Gothic, where the right border in make menuconfig will appear invisible, because that's what MS Gothic tells us to do:
image

For further improvements we'll have to wait for #5897.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-AtlasEngine In-PR This issue has a related PR Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-2 A description (P2) Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants