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

Font rendering makes icons look flattish #18129

Closed
dias-yelgonov opened this issue Oct 31, 2024 · 13 comments
Closed

Font rendering makes icons look flattish #18129

dias-yelgonov opened this issue Oct 31, 2024 · 13 comments
Labels
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

Comments

@dias-yelgonov
Copy link

Windows Terminal version

1.21.2911.0

Windows build number

10.0.22631.0

Other Software

  1. Oh-my-posh 23.17.0 - 23.20.3
  2. Windows Terminal 1.20.11781.0 - 1.21.2911.0
  3. MesloLGM Nerd Font.
    I've tried it with all sizes of fonts in that font-family.
    Downloaded from same portal, installed in the same way, using settings -> Personalization -> Fonts -> Browse and Install Fonts.
    Clear fonts cache.
    Restart machine on each step.
    Moving all fonts from "good" to "bad" machines

Steps to reproduce

Not sure how to properly describe my issue. And haven't found anything similar.

Three Windows machines, same OS, identical configs for terminal & oh-my-posh theme file.
Two of them have the issue with theme's icons in terminal. They are looking flattish (?) The Windows OS icon looks like a simple square, but on the second machine same icon looks a little bit different due to different angle?

To reproduce:

  1. Run the Windows Terminal with PowerShell session.

Expected Behavior

  1. "Good Machine No 3". Intel based (i7-8750h). That's how it should look like.

Correct rendered version by default, from first session, first run:
Image

Actual Behavior

  1. "Bad Machine No. 1". AMD based (7800x3d). Completely flat, almost fresh system,
    Image
    On this machine, the render issue can be temporarily fixed:
  1. just open the terminal's settings tab (can close it or keep it open, doesn't make sense). Doing nothing there.
  2. Re-open or open new PowerShell session
  3. As long as this terminal's instance (process) is working, all new sessions in existing instance and new instances will be rendered correctly.

But as soon as I close that "fixed" instance (i.e. all active Windows terminals) and open a new one, the same render issue appears.

  1. "Bad Machine No. 2". Intel Based (Core Ultra 5 125h). Different angle of icon, fresh system:
    Image

For this system, the temporary fix doesn't work at all. Nothing works.

@dias-yelgonov dias-yelgonov 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 Oct 31, 2024
@dias-yelgonov dias-yelgonov changed the title Font rendering make icons look flattish Font rendering makes icons look flattish Oct 31, 2024
@Link1J
Copy link

Link1J commented Nov 1, 2024

First, there is something wrong with rendering of powerline characters on the good machine.

Second, that icon your looking for doesn't exist in Nerd Fonts currently. It was replaced two years ago with the Windows 10 logo (the icon seen on bad machine 2) in ryanoasis/nerd-fonts#978, then a year ago with the Windows 11 logo (the icon on bad machine 1) in ryanoasis/nerd-fonts#1290.

@lhecker
Copy link
Member

lhecker commented Nov 1, 2024

First, there is something wrong with rendering of powerline characters on the good machine.

I suspect they're using a significantly older version of Windows Terminal on that machine or perhaps have "AtlasEngine" disabled in the rendering settings, but I think it's the former. We used to have various glyph-overlap bugs in older versions that looked exactly like this that have long since been fixed.

Second, that icon your looking for doesn't exist in Nerd Fonts currently. [...]

In other words, they don't have the same MesloLGM Nerd Font version on their different devices? @dias-yelgonov you could try downloading and installing an older version of the font then. Also, please make sure to update your Windows Terminal to 1.21 on all devices.

@dias-yelgonov
Copy link
Author

Second, that icon your looking for doesn't exist in Nerd Fonts currently

Then why the "Bad Machine No. 1" displays it after opening the terminal settings, without doing touching nothing there. Literally, open - close action.

I suspect they're using a significantly older version of Windows Terminal on that machine or perhaps have "AtlasEngine" disabled in the rendering settings

Since 1.20.11271 it is enabled by default, and even disappeared from JSON file on all three machines.
I also have tried to transfer the config file from one machine to another and make the setup identical; Tried to check option step-by-step manually;

Windows Terminal to 1.21 on all devices

Upgraded to 1.21 on the moment of opening the ticket. Latest version of terminal from Microsoft store, at the moment of opening the issue. Atlas Engine option is

try downloading and installing an older version of the font

Thanks for advice. Not sure about it, due to first quote, but will test it anyway and update the issue

@DHowett
Copy link
Member

DHowett commented Nov 1, 2024

Just so you know, it appears that there are three distinct Windows icon glyphs in Nerd Fonts, spread over five code points.

Image

Can you copy the actual text of your prompt as printed to the terminal on the "good" and "bad" systems and share them here?

Thanks!

@dias-yelgonov
Copy link
Author

dias-yelgonov commented Nov 1, 2024

three distinct Windows icon glyphs in Nerd Fonts

I've ensured that e62a is used in each oh-my-posh config.

If I understand it correctly, I've just selected the prompt of Windows terminal and pasted it here.

"Bad Machine No 1."

 soul_lucky: ~ ❯

"Good Machine"

 soul_lucky: ~ ❯

@DHowett
Copy link
Member

DHowett commented Nov 1, 2024

Alright, so here's a wild idea.

Can you run this (powershell) on all of the machines?

ls c:\windows\fonts *eslo* -r
ls $env:LOCALAPPDATA\Microsoft\Windows\Fonts *eslo* -r

Working theory: fonts installed per-user and fonts installed per-machine are fighting it out in a cage match1 and which one "wins" changes.

Footnotes

  1. Packaged applications like Terminal apparently have no end of issues with per-user fonts. The user font cache service is poorly designed.

@dias-yelgonov
Copy link
Author

dias-yelgonov commented Nov 1, 2024

Bad Machine No. 1

 soul_lucky: ~ ❯ ls c:\windows\fonts *eslo* -r


    Directory: C:\windows\fonts


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----        11/1/2024   9:18 PM        2520012   Meslo LG L Bold Italic Nerd Font Complete Mono Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2619432   Meslo LG L Bold Italic Nerd Font Complete Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2561896   Meslo LG L Bold Nerd Font Complete Mono Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2661848   Meslo LG L Bold Nerd Font Complete Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2520060   Meslo LG L DZ Bold Italic Nerd Font Complete Mono Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2619480   Meslo LG L DZ Bold Italic Nerd Font Complete Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2561948   Meslo LG L DZ Bold Nerd Font Complete Mono Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2661900   Meslo LG L DZ Bold Nerd Font Complete Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2511320   Meslo LG L DZ Italic Nerd Font Complete Mono Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2610996   Meslo LG L DZ Italic Nerd Font Complete Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2552444   Meslo LG L DZ Regular Nerd Font Complete Mono Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2652648   Meslo LG L DZ Regular Nerd Font Complete Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2511264   Meslo LG L Italic Nerd Font Complete Mono Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2610940   Meslo LG L Italic Nerd Font Complete Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2552392   Meslo LG L Regular Nerd Font Complete Mono Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2652596   Meslo LG L Regular Nerd Font Complete Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2519900   Meslo LG M Bold Italic Nerd Font Complete Mono Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2619396   Meslo LG M Bold Italic Nerd Font Complete Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2561784   Meslo LG M Bold Nerd Font Complete Mono Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2661812   Meslo LG M Bold Nerd Font Complete Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2519948   Meslo LG M DZ Bold Italic Nerd Font Complete Mono Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2619444   Meslo LG M DZ Bold Italic Nerd Font Complete Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2561836   Meslo LG M DZ Bold Nerd Font Complete Mono Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2661864   Meslo LG M DZ Bold Nerd Font Complete Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2511208   Meslo LG M DZ Italic Nerd Font Complete Mono Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2610960   Meslo LG M DZ Italic Nerd Font Complete Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2552332   Meslo LG M DZ Regular Nerd Font Complete Mono Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2652612   Meslo LG M DZ Regular Nerd Font Complete Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2511152   Meslo LG M Italic Nerd Font Complete Mono Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2610904   Meslo LG M Italic Nerd Font Complete Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2552280   Meslo LG M Regular Nerd Font Complete Mono Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2652560   Meslo LG M Regular Nerd Font Complete Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        1314660   Meslo LG M Regular Nerd Font Complete.ttf
-a----        11/1/2024   9:18 PM        2519848   Meslo LG S Bold Italic Nerd Font Complete Mono Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2619364   Meslo LG S Bold Italic Nerd Font Complete Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2561732   Meslo LG S Bold Nerd Font Complete Mono Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2661780   Meslo LG S Bold Nerd Font Complete Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2519896   Meslo LG S DZ Bold Italic Nerd Font Complete Mono Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2619412   Meslo LG S DZ Bold Italic Nerd Font Complete Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2561784   Meslo LG S DZ Bold Nerd Font Complete Mono Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2661832   Meslo LG S DZ Bold Nerd Font Complete Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2511156   Meslo LG S DZ Italic Nerd Font Complete Mono Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2610928   Meslo LG S DZ Italic Nerd Font Complete Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2552280   Meslo LG S DZ Regular Nerd Font Complete Mono Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2652580   Meslo LG S DZ Regular Nerd Font Complete Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2511100   Meslo LG S Italic Nerd Font Complete Mono Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2610872   Meslo LG S Italic Nerd Font Complete Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2552228   Meslo LG S Regular Nerd Font Complete Mono Windows Compatible.ttf
-a----        11/1/2024   9:18 PM        2652528   Meslo LG S Regular Nerd Font Complete Windows Compatible.ttf


 soul_lucky: ~ ❯ ls $env:LOCALAPPDATA\Microsoft\Windows\Fonts *eslo* -r
 soul_lucky: ~ ❯

Good Machine

 soul_lucky: ~ ❯ ls c:\windows\fonts *eslo* -r


    Directory: C:\windows\fonts


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----        3/20/2023   3:52 PM        2520012   Meslo LG L Bold Italic Nerd Font Complete Mono Windows
                                                 Compatible.ttf
-a----        3/20/2023   3:52 PM        2619432   Meslo LG L Bold Italic Nerd Font Complete Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2561896   Meslo LG L Bold Nerd Font Complete Mono Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2661848   Meslo LG L Bold Nerd Font Complete Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2520060   Meslo LG L DZ Bold Italic Nerd Font Complete Mono Windows
                                                 Compatible.ttf
-a----        3/20/2023   3:52 PM        2619480   Meslo LG L DZ Bold Italic Nerd Font Complete Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2561948   Meslo LG L DZ Bold Nerd Font Complete Mono Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2661900   Meslo LG L DZ Bold Nerd Font Complete Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2511320   Meslo LG L DZ Italic Nerd Font Complete Mono Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2610996   Meslo LG L DZ Italic Nerd Font Complete Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2552444   Meslo LG L DZ Regular Nerd Font Complete Mono Windows
                                                 Compatible.ttf
-a----        3/20/2023   3:52 PM        2652648   Meslo LG L DZ Regular Nerd Font Complete Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2511264   Meslo LG L Italic Nerd Font Complete Mono Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2610940   Meslo LG L Italic Nerd Font Complete Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2552392   Meslo LG L Regular Nerd Font Complete Mono Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2652596   Meslo LG L Regular Nerd Font Complete Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2519900   Meslo LG M Bold Italic Nerd Font Complete Mono Windows
                                                 Compatible.ttf
-a----        3/20/2023   3:52 PM        2619396   Meslo LG M Bold Italic Nerd Font Complete Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2561784   Meslo LG M Bold Nerd Font Complete Mono Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2661812   Meslo LG M Bold Nerd Font Complete Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2519948   Meslo LG M DZ Bold Italic Nerd Font Complete Mono Windows
                                                 Compatible.ttf
-a----        3/20/2023   3:52 PM        2619444   Meslo LG M DZ Bold Italic Nerd Font Complete Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2561836   Meslo LG M DZ Bold Nerd Font Complete Mono Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2661864   Meslo LG M DZ Bold Nerd Font Complete Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2511208   Meslo LG M DZ Italic Nerd Font Complete Mono Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2610960   Meslo LG M DZ Italic Nerd Font Complete Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2552332   Meslo LG M DZ Regular Nerd Font Complete Mono Windows
                                                 Compatible.ttf
-a----        3/20/2023   3:52 PM        2652612   Meslo LG M DZ Regular Nerd Font Complete Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2511152   Meslo LG M Italic Nerd Font Complete Mono Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2610904   Meslo LG M Italic Nerd Font Complete Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2552280   Meslo LG M Regular Nerd Font Complete Mono Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2652560   Meslo LG M Regular Nerd Font Complete Windows Compatible.ttf
-a----        1/26/2020  11:00 AM        1314660   Meslo LG M Regular Nerd Font Complete.ttf
-a----        3/20/2023   3:52 PM        2519848   Meslo LG S Bold Italic Nerd Font Complete Mono Windows
                                                 Compatible.ttf
-a----        3/20/2023   3:52 PM        2619364   Meslo LG S Bold Italic Nerd Font Complete Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2561732   Meslo LG S Bold Nerd Font Complete Mono Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2661780   Meslo LG S Bold Nerd Font Complete Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2519896   Meslo LG S DZ Bold Italic Nerd Font Complete Mono Windows
                                                 Compatible.ttf
-a----        3/20/2023   3:52 PM        2619412   Meslo LG S DZ Bold Italic Nerd Font Complete Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2561784   Meslo LG S DZ Bold Nerd Font Complete Mono Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2661832   Meslo LG S DZ Bold Nerd Font Complete Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2511156   Meslo LG S DZ Italic Nerd Font Complete Mono Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2610928   Meslo LG S DZ Italic Nerd Font Complete Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2552280   Meslo LG S DZ Regular Nerd Font Complete Mono Windows
                                                 Compatible.ttf
-a----        3/20/2023   3:52 PM        2652580   Meslo LG S DZ Regular Nerd Font Complete Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2511100   Meslo LG S Italic Nerd Font Complete Mono Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2610872   Meslo LG S Italic Nerd Font Complete Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2552228   Meslo LG S Regular Nerd Font Complete Mono Windows Compatible.ttf
-a----        3/20/2023   3:52 PM        2652528   Meslo LG S Regular Nerd Font Complete Windows Compatible.ttf


 soul_lucky: ~ ❯ ls $env:LOCALAPPDATA\Microsoft\Windows\Fonts *eslo* -r
 soul_lucky: ~ ❯

@lhecker
Copy link
Member

lhecker commented Nov 1, 2024

Mode                LastWriteTime         Length Name
----                -------------         ------ ----
              3/20/2023   3:52 PM

The latest version of Meslo LG NF came out 2024-04-12 which makes that date a little suspicious. Personally, I'd try and copy the font files from the good machine to the bad machine.

Upgraded to 1.21 on the moment of opening the ticket.

Oh, so you have the Builtin Glyphs setting disabled, right?

Image

@Link1J
Copy link

Link1J commented Nov 1, 2024

-a----        3/20/2023   3:52 PM        2652560   Meslo LG M Regular Nerd Font Complete Windows Compatible.ttf
-a----        1/26/2020  11:00 AM        1314660   Meslo LG M Regular Nerd Font Complete.ttf
-a----        3/20/2023   3:52 PM        2519848   Meslo LG S Bold Italic Nerd Font Complete Mono Windows
                                                 Compatible.ttf

Uh, Windows Compatible fonts have different font names then ones without that.
On the Good Machine, you have been using a font from 2020.
Bad Machine 2 is probably not using the font you thought it was (Font is set as MesloLGM NF), which is why no workaround works.
On Bad Machine 1 you installed the latest version, which does have the same font name as the non-Windows Compatible fonts, but has a different file name.

@dias-yelgonov There wouldn't happen to be any ForPowerline versions of the font in the drop down for Bad Machine 1, would there?

@dias-yelgonov
Copy link
Author

Oh, so you have the Builtin Glyphs setting disabled, right?

It was enabled, same as on screenshot. On all machines.

@dias-yelgonov There wouldn't happen to be any ForPowerline versions of the font in the drop down for Bad Machine 1, would there?

Nope. Only Bold/Italic/Mono variations that I do not choose

Bad Machine 2 is probably not using the font you thought it was (Font is set as MesloLGM NF), which is why no workaround works.

To be honest, I've deleted all fonts with "eslo" name on all machines. Not sure if they are cached somewhere else and will it try to re-install the latest one.

Off-topic: where I can find icons/symbols within the font? Maybe it will be easier for me to change the OS icon...

@Link1J
Copy link

Link1J commented Nov 1, 2024

Huh.
I am not sure what version that one from 2020 is. But it seems to a custom version.

Here is where you can find every icon in nerd fonts.
https://www.nerdfonts.com/cheat-sheet

@dias-yelgonov
Copy link
Author

Thank you everyone for highlighting the differences with installed fonts.

The "issue" was with a font from 2020.
I just had to delete that particular version to get the same "ugly and flat" icon on the good machine.
IDK how it was remaining on that particular machine, because I was re-installing and deleting fonts multiple times within a month.

@DHowett
Copy link
Member

DHowett commented Nov 2, 2024

Hey, I’m glad you got it figured out! We’ll be here if you’ve got another font—or Terminal, for that matter—mystery!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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
Projects
None yet
Development

No branches or pull requests

4 participants