Italic text is rendered incorrectly and looks weird #18554

Closed
opened 2026-01-31 06:17:31 +00:00 by claunia · 2 comments
Owner

Originally created by @zhang-stephen on GitHub (Sep 28, 2022).

Originally assigned to: @lhecker on GitHub.

Windows Terminal version

1.16.2641.0

Windows build number

windows 21H2 enterprise 19044.1889

Other Software

  • GNU bash 4.2.46(2)-release, x86_64-redhat-linux-gnu
  • tmux 3.1a, with $TERM=xterm-256color
  • CentOS 7.9 x64, login by openSSH integrated in windows
  • Font: FiraCode NF Retina with NERD font patch.

Steps to reproduce

login the CentOS, and run tmux, then run these following commands:

echo -e "ABCDEFGHIJKLMNOPQRSTUVWXYZ \e[3mABCDEFGHIJKLMNOPQRSTUVWXYZ\e[0m"
echo -e "abcdefghijklmnopqrstuvwxyz \e[3mabcdefghijklmnopqrstuvwxyz\e[0m"
echo -e "0123456789,./<>?;'[]:{}-=_+*&^%$#@!()| \e[3m0123456789,./<>?;'[]:{}-=_+*&^%$#@!()|\e[0m"

The configuration for the SSH session:

{
    "adjustIndistinguishableColors": "indexed",
    "antialiasingMode": "grayscale",
    "backgroundImage": null,
    "closeOnExit": "always",
    "colorScheme": "Campbell",
    "commandline": "ssh p8zhang@<host>",
    "cursorShape": "underscore",
    "font":
    {
        "face": "FiraCode NF Retina",
        "size": 11.0
    },
    "guid": "{6c5275a4-b63e-46ce-a2eb-e3ea1f73666f}",
    "hidden": false,
    "historySize": 100001,
    "intenseTextStyle": "bright",
    "opacity": 85,
    "padding": "8",
    "useAcrylic": true,
    "useAtlasEngine": true
}

I guessed this issue is related to the new Atlas Engine, but there would be nothing changed if I turned off it.

Expected Behavior

No response

Actual Behavior

You will get these WEIRD italics:
image

And this issue could be reproduced in the PowerShell 7.2.6, with the almost same configuration of the SSH session.
Just run "$($PSStyle.italic)ABCDEFGHIJKLMNOPQRSTUVWXYZ", you will got the similar result:
image

Originally created by @zhang-stephen on GitHub (Sep 28, 2022). Originally assigned to: @lhecker on GitHub. ### Windows Terminal version 1.16.2641.0 ### Windows build number windows 21H2 enterprise 19044.1889 ### Other Software + GNU bash 4.2.46(2)-release, x86_64-redhat-linux-gnu + tmux 3.1a, with `$TERM=xterm-256color` + CentOS 7.9 x64, login by openSSH integrated in windows + Font: FiraCode NF Retina with NERD font patch. ### Steps to reproduce login the CentOS, and run `tmux`, then run these following commands: ```shell echo -e "ABCDEFGHIJKLMNOPQRSTUVWXYZ \e[3mABCDEFGHIJKLMNOPQRSTUVWXYZ\e[0m" echo -e "abcdefghijklmnopqrstuvwxyz \e[3mabcdefghijklmnopqrstuvwxyz\e[0m" echo -e "0123456789,./<>?;'[]:{}-=_+*&^%$#@!()| \e[3m0123456789,./<>?;'[]:{}-=_+*&^%$#@!()|\e[0m" ``` The configuration for the SSH session: ```js { "adjustIndistinguishableColors": "indexed", "antialiasingMode": "grayscale", "backgroundImage": null, "closeOnExit": "always", "colorScheme": "Campbell", "commandline": "ssh p8zhang@<host>", "cursorShape": "underscore", "font": { "face": "FiraCode NF Retina", "size": 11.0 }, "guid": "{6c5275a4-b63e-46ce-a2eb-e3ea1f73666f}", "hidden": false, "historySize": 100001, "intenseTextStyle": "bright", "opacity": 85, "padding": "8", "useAcrylic": true, "useAtlasEngine": true } ``` I guessed this issue is related to the new Atlas Engine, but **there would be nothing changed if I turned off it**. ### Expected Behavior _No response_ ### Actual Behavior You will get these __WEIRD__ italics: ![image](https://user-images.githubusercontent.com/17326718/192675834-3a3b0144-8f17-4960-ae2e-dd7eb2818524.png) And this issue could be reproduced in the PowerShell 7.2.6, with the almost same configuration of the SSH session. Just run `"$($PSStyle.italic)ABCDEFGHIJKLMNOPQRSTUVWXYZ"`, you will got the similar result: ![image](https://user-images.githubusercontent.com/17326718/192676025-fb5eb9d9-ee95-4c88-b234-7788eb1a50fe.png)
claunia added the Issue-BugIn-PRProduct-TerminalPriority-2Area-AtlasEngine labels 2026-01-31 06:17:32 +00:00
Author
Owner

@zhang-stephen commented on GitHub (Sep 28, 2022):

I think it's an issue introduced by new Atlas Engine now... The renderer works well with reopening the session after new engine disabled.

@zhang-stephen commented on GitHub (Sep 28, 2022): I think it's an issue introduced by new Atlas Engine now... The renderer works well with reopening the session after new engine disabled.
Author
Owner

@lhecker commented on GitHub (Sep 29, 2022):

Yep we know about this issue. This happens because we don't support glyphs that are too wide to fit into their cells. For instance the "A" character is 1 cell wide. But a italic "A" character is about 1.2 cells wide and so it gets shrinked down. This primarily happens with Nerd Fonts because it doesn't ship italic variations with their fonts.
I'm currently working on a general solution.

@lhecker commented on GitHub (Sep 29, 2022): Yep we know about this issue. This happens because we don't support glyphs that are too wide to fit into their cells. For instance the "A" character is 1 cell wide. But a italic "_A_" character is about 1.2 cells wide and so it gets shrinked down. This primarily happens with Nerd Fonts because it doesn't ship italic variations with their fonts. I'm currently working on a general solution.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#18554