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

[1.18] Certain fonts will cause a renderer error (MesloLGM NF, Cascadia Code Nerd Font) #15416

Closed
ffes opened this issue May 24, 2023 · 10 comments · Fixed by #15403
Closed

[1.18] Certain fonts will cause a renderer error (MesloLGM NF, Cascadia Code Nerd Font) #15416

ffes opened this issue May 24, 2023 · 10 comments · Fixed by #15403
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues In-PR This issue has a related PR Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal.

Comments

@ffes
Copy link

ffes commented May 24, 2023

Windows Terminal version

1.18.1421.0

Windows build number

10.0.19045.2965

Other Software

oh-my-posh v16.8.0
Ubuntu 22.04.02 LTS

Steps to reproduce

  • Make sure oh-my-posh is started automatically on startup
  • Open a new tab
  • Notice the render problems
  • Press enters, type text
  • Notice even more render problems
  • Wait a while and see the renderer catch up

It seems impossible to create a screenshot with the snipping tool because when the focus on WT is lost, the renderer catches up immediately.

Tearing of a tab created an error the very first time, but couldn't reproduce it anymore.

Expected Behavior

No response

Actual Behavior

Various rendering issues

@ffes ffes 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 May 24, 2023
@zadjii-msft
Copy link
Member

Could you share your settings.json file/?

This might be partially the font thing from #15403

@lhecker
Copy link
Member

lhecker commented May 24, 2023

I'm sorry for causing the issue - We only noticed it mere hours before publishing 1.18 and I already opened a PR to fix it: #15403. If you can and don't mind, it'd be great if you could use an alternative font just for a week, because it would help us find other potential bugs you might encounter. I personally for instance like using Delugia. Otherwise, I hope we'll be able to ship a fix soon!

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something In-PR This issue has a related PR labels May 24, 2023
@zadjii-msft zadjii-msft changed the title Render issues with v1.8 and oh-my-posh [1.18] Certain fonts will cause a renderer error (MesloLGM NF, Cascadia Code Nerd Font) May 25, 2023
@zadjii-msft zadjii-msft pinned this issue May 25, 2023
@zadjii-msft zadjii-msft added Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Product-Terminal The new Windows Terminal. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels May 25, 2023
@zadjii-msft zadjii-msft added this to the Terminal v1.19 milestone May 25, 2023
@zadjii-msft
Copy link
Member

Collected notes from other threads:

Fixes:

If you're experiencing this, you can

  • Switch to another font temporarily. Delugia Code is apparently a bit better.
  • Manually disable the Atlas engine. You can do that in the settings.json like so:
      "profiles":
      {
          "defaults":
          {
              "useAtlasEngine": false
              
    Or in the Settings UI:
    image
    You need to create new tabs after making this change, or restart the application. Existing tabs will retain the text renderer they were created with.

@lhecker also built a Windows Terminal Preview version that integrates the previous 3 AtlasEngine bug fixes, 2 of which might be relevant here: #15403 and #15425. You can download it here: blob.hecker.io/sharex/Microsoft.WindowsTerminalPreview_1.18.1443.0_8wekyb3d8bbwe.msixbundle I'm using my own personal domain because I don't want to expose my internal work addresses. However the file is properly cryptographically signed by Microsoft.

@DennisGaida
Copy link

Confirming that the version you posted does not have the reported problems.

microsoft-github-policy-service bot pushed a commit that referenced this issue May 25, 2023
`til::rect`'s truthiness check (= rect is valid) returns `false` for
any rects that have negative coordinates. This makes sense for buffer
handling, but breaks AtlasEngine, where glyph coordinates can go out
of bounds and it's entirely valid for that to happen.

Closes #15416

## Validation Steps Performed
* Use MesloLGM NF and print NF glyphs in the first row
* Text rendering, selection, etc., still works ✅

---------

Co-authored-by: Dustin L. Howett <duhowett@microsoft.com>
DHowett added a commit that referenced this issue May 25, 2023
`til::rect`'s truthiness check (= rect is valid) returns `false` for
any rects that have negative coordinates. This makes sense for buffer
handling, but breaks AtlasEngine, where glyph coordinates can go out
of bounds and it's entirely valid for that to happen.

Closes #15416

## Validation Steps Performed
* Use MesloLGM NF and print NF glyphs in the first row
* Text rendering, selection, etc., still works ✅

---------

Co-authored-by: Dustin L. Howett <duhowett@microsoft.com>
(cherry picked from commit a9f34e3)
Service-Card-Id: 89326794
Service-Version: 1.18
@withinboredom
Copy link

We only noticed it mere hours before publishing 1.18

I'm not going to lie, I didn't even have the non-preview version installed and didn't even realize I was running the preview version. This thing is so rock solid for me, I wish I had it on my Linux machine.

Keep up the excellent work!

@ryan-ambit
Copy link

ryan-ambit commented May 26, 2023

I can confirm the rendering error with Nerd Font v3 (Cascadia Cove Nerd Font Mono) when using neovim with nerd font v3 symbols.

After turning off Atlas Engine, the rendering is now normal!

Nerd Font v3 was released in late April this year. So there might be more undiscovered bugs with the new utf8 characters introduced in Nerd Font v3 specs.

@ffes
Copy link
Author

ffes commented May 29, 2023

Just tried v1.18.1462.0 and indeed the problem is fixed. Thanks a lot for fixing this so quickly.

@withinboredom
Copy link

withinboredom commented May 31, 2023

@zadjii-msft -- still seeing some differences in rendering. This is original:

image

This is 1.18.1462.0

image

I can't figure out how to give you a simple reproduction, but the easiest would be to install oh-my-zsh and go through the powerlevel10k installation wizard which does a whole bunch of interesting things to the terminal.

@zadjii-msft
Copy link
Member

@withinboredom Mind filing a new issue? That looks like a much more minor graphical error, vs the pretty substantial issue this thread was originally tracking. Thanks!

@withinboredom
Copy link

Will do, thanks for the fast response @zadjii-msft !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues In-PR This issue has a related PR Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants