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

VT underline, overline, strikethrough, hyperlink are not high-DPI aware #7954

Closed
PhMajerus opened this issue Oct 17, 2020 · 3 comments
Closed
Labels
Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Resolution-By-Design It's supposed to be this way. Sometimes for compatibility reasons.

Comments

@PhMajerus
Copy link

PhMajerus commented Oct 17, 2020

In Windows Terminal 1.4, the rendering of VT attributes such as underline, double underline, overline, crossed and hyperlinks are always 1px thick and hyperlink dashes are always 3;1 pixels regardless of the screen DPI and UI scaling factor.

This makes it very think, and the dashes of hyperlink almost invisible on high DPI displays such as the Surface Book 2 (which defaults at 200%).

It would be more consistent and more readable if the lines and dashes were also scaled according to the scaling factor or to the current font size.

See the following screenshot on Surface Book 2:
echo -e "\e[4mUnderline\e[24m \e[21mDblUL\e[24m \e[53mOverline\e[55m \e[9mCrossed\e[29m \e]8;;http://www.example.com\aHyperlink\e]8;;\a"
image

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Oct 17, 2020
@j4james
Copy link
Collaborator

j4james commented Oct 17, 2020

They are definitely DPI aware. It's just that they have a minimum size of a pixel (so they're not invisible at low resolution), and some fonts are styled to use a very narrow width that is only 1 pixel even when the DPI is high. So while that would technically be less than a pixel at a lower DPI, it gets rounded up to 1, and thus there doesn't appear to be any difference between the two.

I know Cascadia is particularly thin - Consolas uses a more reasonable width in my view. But note that if your font size is small, that's also more likely to result in an underline that could still be 1px at high DPI.

@DHowett
Copy link
Member

DHowett commented Oct 19, 2020

This one is operating by design. Thanks for filling in the details @j4james! 😄

@DHowett DHowett closed this as completed Oct 19, 2020
@DHowett DHowett added the Resolution-By-Design It's supposed to be this way. Sometimes for compatibility reasons. label Oct 19, 2020
@PhMajerus
Copy link
Author

Just for reference, this was an issue with the Cascadia font (microsoft/cascadia-code#395) and got resolved in Feb 2021 releases with the new font version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Resolution-By-Design It's supposed to be this way. Sometimes for compatibility reasons.
Projects
None yet
Development

No branches or pull requests

3 participants