Skip to content

AtlasEngine rendering wide Nerd Font glyphs incorrectly #14022

Closed

Description

@SivanagBalla

Windows Terminal version

1.16.2523.0

Windows build number

10.0.19044

Other Software

UbuntuMono Nerd font installed from https://github.com/ryanoasis/nerd-fonts/releases/download/v2.2.2/Ubuntu.zip
WSL, running Ubuntu 20.04.1 LTS. SSHing into a RHEL server
The linux server is running tmux with custom status bar with "double wide" icon characters

Steps to reproduce

Use UbuntuMono Nerd Font and configure some double wide character in status bar or print them in terminal

Issue is seen with new AtlasEngined enabled(which is default with new version). Disabling AtlasEngine will bring back old behaviour

Expected Behavior

Double wide characters such as clock, calender which are available in NerdFond are to be rendered as below

image
image

Actual Behavior

image
image

Activity

  1. added
    Issue-BugIt either shouldn't be doing this or needs an investigation.
    on Sep 16, 2022
  2. ghost added
    Needs-Tag-FixDoesn't match tag requirements
    on Sep 16, 2022
  3. ghost added
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Sep 16, 2022
  4. T4P4N commented on Sep 17, 2022

    @T4P4N

    same here

  5. changed the title [-]UbuntuMono Nerd Font rendering double wide font incorrectly[/-] [+]AtlasEngine: Nerd Font rendering double wide glyphs incorrectly[/+] on Sep 25, 2022
  6. changed the title [-]AtlasEngine: Nerd Font rendering double wide glyphs incorrectly[/-] [+]AtlasEngine rendering wide Nerd Font glyphs incorrectly[/+] on Sep 25, 2022
  7. lhecker commented on Sep 25, 2022

    @lhecker
    Member

    I gave this issue a title that will hopefully make it easier to find in the future. 🙂

    FYI I'm currently working on a version of AtlasEngine that solves this issue fundamentally, by going with a more traditional text rendering approach, allowing for freely overlapping glyphs. My prototype is already capable of handling all Nerd Font glyphs correctly.
    Unfortunately however it comes with its own set of downsides (slightly slower, more complex, doesn't support user-defined text shaders), so the jury is still out on when and in what shape we'll fix this issue. Don't worry though: Until it's been fixed, the old text renderer will not go away.

  8. added this to the 22H2 milestone on Sep 25, 2022
  9. ghost removed
    Needs-Tag-FixDoesn't match tag requirements
    on Sep 25, 2022
  10. stephc-int13 commented on Sep 25, 2022

    @stephc-int13

    I gave this issue a title that will hopefully make it easier to find in the future. 🙂

    FYI I'm currently working on a version of AtlasEngine that solves this issue fundamentally, by going with a more traditional text rendering approach, allowing for freely overlapping glyphs. My prototype is already capable of handling all Nerd Font glyphs correctly. Unfortunately however it comes with its own set of downsides (slightly slower, more complex, doesn't support user-defined text shaders), so the jury is still out on when and in what shape we'll fix this issue. Don't worry though: Until it's been fixed, the old text renderer will not go away.

    You could probably do that in two passes.
    First pass with the usual shader rendering standard cells, second pass rendering the overlapping cells if necessary.
    That is probably optimal and avoid unnecessary overhead.

  11. 3 remaining items

  12. stephc-int13 commented on Sep 25, 2022

    @stephc-int13

    The more I think about it the more I think that the whole rendering can be entirely done in one single shader pass.

    But that does require a bit of preprocessing and adding metadata for each cell to handle all the cases.
    That would mostly be a few special case flags to tell the shader to look for more information in adjacent cells (top, left or bottom)

    But of course, given that performance gains are not critical (the optimal solution would be a bit more power efficient) you should simply follow your guts and go for the solution that is the simpler to implement for you.

  13. lhecker commented on Sep 25, 2022

    @lhecker
    Member

    Thanks for your input! I'll definitely try my hardest to come up with something decent. Nothing is set in stone so far. 🙂

  14. jessey-git commented on Sep 27, 2022

    @jessey-git

    I seem to have a similar problem, except that version 2523 is ok, but the most recent 2642 is broken. I'm using MesloLGM NF at size 9.0 (tried 8.5 and 9.5 as well and those were much worse).

    2523 on top, 2642 on bottom:
    fontbrokenness

    Is this the same or a different issue?

  15. stephc-int13 commented on Sep 27, 2022

    @stephc-int13

    You can disable the new atlas renderer in the settings, if that solves your issue then it is related.

  16. jessey-git commented on Sep 27, 2022

    @jessey-git

    Yeah, disabling Atlas fixes the problem. Welp, it worked for almost 14 days with the prior version. It had a good run :) Will try Atlas again once this issue here is all fixed.

  17. lhecker commented on Sep 27, 2022

    @lhecker
    Member

    Jesse Yurkovich (@jessey-git) I'm sorry I broke your font! 😔

    I hope you don't mind me saying this, but your font is... weird. 😄
    It looks beautiful of course, but it handles its block characters in a very unusual manner. That character (U+E0B0) works in all other Nerd Fonts I got installed (for instance Fira Code), just not with this Meslo variant, which is already a bit weird. Additionally my understanding is that block characters are expected to have approximately the same size as the font's advance width and height. While most Nerd Fonts variants are slightly incorrect in that regard, Meslo in particular is really bad about this. This particular glyph for instance is almost 40% taller than the advance height it specifies which causes it to look like that. The only difference between build 2523 and 2642 is how those glyphs are vertically centered. In both screenshots you're missing more than half of that glyph - it's actually supposed to be a perfect triangle like this:
    image

    Basically, IMO Nerd Fonts should stop making block glyphs taller than the font's advance height.
    In either case I'm going to simply revert the change that causes your issues: #14085

  18. removed
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Oct 12, 2022
  19. ghost added
    Needs-Tag-FixDoesn't match tag requirements
    on Oct 12, 2022
  20. ghost removed
    Needs-Tag-FixDoesn't match tag requirements
    on Dec 5, 2022
  21. djdv commented on Mar 9, 2023

    @djdv

    I was seeing the same rendering issue with the Powerline Extra block of glyphs, which was reported upstream:
    ryanoasis/nerd-fonts#1106 (my specific configuration ryanoasis/nerd-fonts#1106 (comment) renders similar to the OP of this issue).

    This was resolved by a commit in their patcher ryanoasis/nerd-fonts#1123

    After using the latest version of my font, their patcher, and Terminal, at least those glyphs in my chosen fonts seem to render as expected now.

    People in this thread may want to try them as well to get their renders back to how they looked before.
    And it may be worth checking against their latest patcher revisions versus just the latest release when doing the Atlas refactor if it could potentially influence something here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Area-AtlasEngineIn-PRThis issue has a related PRIssue-BugIt either shouldn't be doing this or needs an investigation.Priority-2A description (P2)Product-TerminalThe new Windows Terminal.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions