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

Box drawing characters are not antialiased #6161

Open
armak opened this issue May 23, 2020 · 15 comments
Open

Box drawing characters are not antialiased #6161

armak opened this issue May 23, 2020 · 15 comments
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal.
Milestone

Comments

@armak
Copy link

armak commented May 23, 2020

Environment

Windows build number: Microsoft Windows [Version 10.0.18362.592]
Windows Terminal version (if applicable): Version: 1.0.1401.0
Any other software? No.

Steps to reproduce

  1. Install the latest 1.x version of Windows Terminal and open a WSL terminal.
  2. Download and display the UTF-8 Demo Text, for an example
    $ curl https://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt

Expected behavior

The box drawings are properly rasterized with antialiasing in similar fashion to the rest of the text. Here is an example from Fluent Terminal using the Inconsolata font:
image

(Note: I'm not necessarily saying this is perfect either, but it's at least closer to what would be an acceptable and more consistent result.)

Actual behavior

The box drawing glyphs are severely aliased, unlike any other text, with visible pixel gaps in diagonal elements, and generally just look really bad. Rendered in the latest stable Windows Terminal version using the Inconsolata font (size 10pt):
image

This behavior is not just limited to Inconsolata, but happens with every font, and every size. Here is for an example Cascadia Mono in different sizes:
8pt
image

10pt
image

12pt
image

This behavior was introduced recently in the RC versions, and I assume 0.11.1333.0 in specific since it included #5743 which altered the way box drawing glyphs were handled. Prior versions had alignment issues with these glyphs that the PR aimed to fix, but at least the glyphs were still rendered nicely individually, with a similar, comparable output to what Fluent Terminal produces.

@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 May 23, 2020
@j4james
Copy link
Collaborator

j4james commented May 23, 2020

I think this is will probably be covered by issue #5897.

@DHowett DHowett added Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. labels May 25, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label May 25, 2020
@DHowett
Copy link
Member

DHowett commented May 25, 2020

Linking, but not closing this. Thanks.

@DHowett DHowett removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label May 25, 2020
@DHowett DHowett added this to the Terminal v1.1 milestone May 25, 2020
@oising
Copy link
Collaborator

oising commented Jun 7, 2020

I add that utf8 file to the repo last year some time: https://github.com/microsoft/terminal/blob/master/doc/reference/UTF8-torture-test.txt

@oising
Copy link
Collaborator

oising commented Jun 7, 2020

It's not too bad at all with Fira Code:

image

@j4james
Copy link
Collaborator

j4james commented Jun 7, 2020

The diagonals are terrible though (U+2571, U+2572, and U+2573). These are "box drawing" characters - they're meant to connect together.

@armak
Copy link
Author

armak commented Jun 7, 2020

@oising Definitely doesn't look like that for me. This is Fira Code at 10pt:
image

@zadjii-msft
Copy link
Member

From #8614

Steps to reproduce

Start Windows Terminal (defaults to PowerShell) and Windows PowerShell (that runs in Windows Console) and log in using ssh in PowerShell to a Raspberry Pi with BOINC and boinctui and run that in each.

Expected behavior

That the scrollbar should be without gaps in Terminal like it is in Console. Console here:
pi@aeblapi1_ ~ 2020-12-18 16_24_42
(The Xbox Game Bar using Alt+Win+PrtSc cut out the lower part of the Window with the status bar, but it is there in reality.)

Actual behavior

The scrollbar has gaps in Terminal. Terminal with original settings (generated by Windows Terminal 1.4.3141.0) here:
pi@aeblapi1_ ~ 2020-12-18 16_23_55

@leduyquang753
Copy link

With the new code-driven box-drawing character rendering feature, the rectangles are also not antialiased. This column has 8 steps and with the column width being 6 pixels here it appears there are only correspondingly 6 steps.

image

Not sure if this should be made a separate issue.

@grable0
Copy link

grable0 commented Nov 10, 2024

Im using Cascadia Mono and box drawing was flawless, no overdraw, no lines, no aliasing.
But after Windows Terminal auto updated itself to 1.21.2911.0 today, that is no longer the case.
Its totally unusable now!

Direct2D + Normal font weight:
Image
Direct3D + Normal font weight:
Image
Direct2D + Medium font weight:
Image
Direct2D + Normal font weight + Zoom x2
Image

I noticed that making the font thicker almost fixes the overlapping of the lines but they still overlap the cells of other characters...

EDIT: Forgot to add that the font size is 12pt and i also noticed that zooming 2 steps in fixes the banding but still there is overlap.

@lhecker
Copy link
Member

lhecker commented Nov 11, 2024

@Grable are you sure you have the builtin glyph setting enabled?
Image

@grable0
Copy link

grable0 commented Nov 11, 2024

No i dont, they are incorrect in both sizing, looks and alignment plus no rounded corners. I prefer the stock box drawing that comes with most fonts as very few actually change them.

EDIT: If this issue is for only builtin glyph drawing I might have put this in the wrong place :/

@lhecker
Copy link
Member

lhecker commented Nov 11, 2024

The builtin glyphs are our solution to the problem you're having. But you're right that the rounded corners are difficult to see at 100% display scale. I'll make them larger and roughly match the way that Cascadia Mono looks like. Hopefully that should be an alright compromise for you.

@grable0
Copy link

grable0 commented Nov 11, 2024

Ok, didnt realize that. It might be that my resolution of 2560x1440 is just too much for those single pixel lines. It just, looks weird is all.
Id expect the thin lines to be thicker than a single pixel...

I do like the rounded look though, so making them more rounded is A OK in my book :D, thank you!

If you didnt already know, there are misalignment between thin and thick lines too, especially noticeable with thick corners and thin edges.
The thin lines should be centered within the thick ones.
Actual:
Image
Expected:
Image

EDIT: A suggestion for the future could be some options to control how the box drawing is done, IE: line width, roundiness, etc.

@lhecker
Copy link
Member

lhecker commented Nov 11, 2024

That was unfortunately intentional. A lot of users asked us for such box glyphs that don't have aliasing ("blur") and so when I only have 1px to work with I've decided that I'd simply make it look somewhat asymmetric. Adding options to control this would be extremely easy to do though: All of the drawing is already parametric. 🙂 If you'd like us to add support for that, please feel free to file an issue for it (the description can be short).

@grable0
Copy link

grable0 commented Nov 11, 2024

I think i will😃 Thank you again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

10 participants