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

Italic text is rendered incorrectly and looks weird #14094

Closed
zhang-stephen opened this issue Sep 28, 2022 · 2 comments · Fixed by #14959
Closed

Italic text is rendered incorrectly and looks weird #14094

zhang-stephen opened this issue Sep 28, 2022 · 2 comments · Fixed by #14959
Assignees
Labels
Area-AtlasEngine In-PR This issue has a related PR Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-2 A description (P2) Product-Terminal The new Windows Terminal.

Comments

@zhang-stephen
Copy link

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

@zhang-stephen zhang-stephen 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 Sep 28, 2022
@zhang-stephen
Copy link
Author

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

@lhecker lhecker changed the title The italic is rendered by wrong way, looks very weird. Italic text is rendered incorrectly and looks weird Sep 29, 2022
@lhecker
Copy link
Member

lhecker commented 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 lhecker added Priority-2 A description (P2) Area-AtlasEngine labels Sep 29, 2022
@carlos-zamora carlos-zamora added Product-Terminal The new Windows Terminal. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Oct 5, 2022
@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label Oct 5, 2022
@ghost ghost added Needs-Tag-Fix Doesn't match tag requirements and removed Needs-Tag-Fix Doesn't match tag requirements labels Oct 5, 2022
@lhecker lhecker removed this from the Terminal v1.17 milestone Oct 12, 2022
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Oct 12, 2022
@microsoft-github-policy-service microsoft-github-policy-service bot added the In-PR This issue has a related PR label Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-AtlasEngine In-PR This issue has a related PR Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-2 A description (P2) Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants