Atlas Engine fails to colour a character at certain text sizes #21125

Open
opened 2026-01-31 07:33:51 +00:00 by claunia · 3 comments
Owner

Originally created by @marioparaschiv on GitHub (Jan 21, 2024).

Windows Terminal version

1.18.3181.0

Windows build number

10.0.22631.0

Other Software

starship 1.17.1

Steps to reproduce

Attempt with AtlasEngine text renderer set to off and you should notice that it no longer fails to colour the character.

Expected Behavior

Arrow should stay green.

Actual Behavior

https://github.com/microsoft/terminal/assets/98427312/8f2fee76-2491-4568-89a2-dd875e4d7ab8

Originally created by @marioparaschiv on GitHub (Jan 21, 2024). ### Windows Terminal version 1.18.3181.0 ### Windows build number 10.0.22631.0 ### Other Software starship 1.17.1 ### Steps to reproduce - Install starship on PowerShell - Use the following config (at %userprofile%\\.config\starship.toml): [starship.zip](https://github.com/microsoft/terminal/files/14003159/starship.zip) - Use the following font: [MonoLisaNerdFont-Regular.zip](https://github.com/microsoft/terminal/files/14003157/MonoLisaNerdFont-Regular.zip) Attempt with AtlasEngine text renderer set to off and you should notice that it no longer fails to colour the character. ### Expected Behavior Arrow should stay green. ### Actual Behavior https://github.com/microsoft/terminal/assets/98427312/8f2fee76-2491-4568-89a2-dd875e4d7ab8
Author
Owner

@DHowett commented on GitHub (Jan 22, 2024):

@lhecker looks like glyph overhangs are being miscolored sometimes

@DHowett commented on GitHub (Jan 22, 2024): @lhecker looks like glyph overhangs are being miscolored _sometimes_
Author
Owner

@lhecker commented on GitHub (Jan 22, 2024):

The reason this occurs is so that we can draw ligatures like <-!-- in multiple colors like so:
image

For now, I would suggest circumventing this issue by changing your starship prompt like so:

"[➜ ](bold green)"

Let me know if that doesn't work!

Fixing the issue on the other hand seems a little difficult. I could make this behavior a little bit more consistent though by using the design width of the glyph (as float) instead of comparing the exact integer pixel width. (That's what's causing the flickering - the ➜ glyph in that font is exactly 1.5 cells wide which causes rounding issues like that.)

@lhecker commented on GitHub (Jan 22, 2024): The reason this occurs is so that we can draw ligatures like `<-!--` in multiple colors like so: ![image](https://github.com/microsoft/terminal/assets/2256941/f7db0045-94e4-47ff-ba83-dff6417eb3e7) For now, I would suggest circumventing this issue by changing your starship prompt like so: ``` "[➜ ](bold green)" ``` Let me know if that doesn't work! Fixing the issue on the other hand seems a little difficult. I could make this behavior a little bit more consistent though by using the design width of the glyph (as `float`) instead of comparing the exact integer pixel width. (That's what's causing the flickering - the ➜ glyph in that font is exactly 1.5 cells wide which causes rounding issues like that.)
Author
Owner

@marioparaschiv commented on GitHub (Jan 22, 2024):

That seemed to do the trick for now, thank you!

@marioparaschiv commented on GitHub (Jan 22, 2024): That seemed to do the trick for now, thank you!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21125