Box drawing characters are not antialiased #8527

Open
opened 2026-01-31 01:31:42 +00:00 by claunia · 15 comments
Owner

Originally created by @armak on GitHub (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.

Originally created by @armak on GitHub (May 23, 2020). # Environment ```none 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](https://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt), 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](https://user-images.githubusercontent.com/4991927/82727405-ff738180-9cf2-11ea-8000-c0f82e8d2669.png) (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](https://user-images.githubusercontent.com/4991927/82727447-58dbb080-9cf3-11ea-9f5b-65debc2ce913.png) 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](https://user-images.githubusercontent.com/4991927/82727590-19fa2a80-9cf4-11ea-80ff-9a0b472cb62f.png) 10pt ![image](https://user-images.githubusercontent.com/4991927/82727598-21213880-9cf4-11ea-91c5-7f53135433f2.png) 12pt ![image](https://user-images.githubusercontent.com/4991927/82727599-25e5ec80-9cf4-11ea-9bb0-cbb876431626.png) 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.
claunia added the Area-RenderingIssue-BugPriority-3Product-Terminal labels 2026-01-31 01:31:42 +00:00
Author
Owner

@j4james commented on GitHub (May 23, 2020):

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

@j4james commented on GitHub (May 23, 2020): I think this is will probably be covered by issue #5897.
Author
Owner

@DHowett commented on GitHub (May 25, 2020):

Linking, but not closing this. Thanks.

@DHowett commented on GitHub (May 25, 2020): Linking, but not closing this. Thanks.
Author
Owner

@oising commented on GitHub (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 commented on GitHub (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
Author
Owner

@oising commented on GitHub (Jun 7, 2020):

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

image

@oising commented on GitHub (Jun 7, 2020): It's not too bad at all with Fira Code: ![image](https://user-images.githubusercontent.com/1844001/83977140-2c678d00-a8cc-11ea-829c-c120bebf740e.png)
Author
Owner

@j4james commented on GitHub (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.

@j4james commented on GitHub (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.
Author
Owner

@armak commented on GitHub (Jun 7, 2020):

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

@armak commented on GitHub (Jun 7, 2020): @oising Definitely doesn't look like that for me. This is Fira Code at 10pt: ![image](https://user-images.githubusercontent.com/4991927/83980283-0e764880-a91d-11ea-9a61-d8989de434a1.png)
Author
Owner

@zadjii-msft commented on GitHub (Dec 21, 2020):

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

@zadjii-msft commented on GitHub (Dec 21, 2020): 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](https://user-images.githubusercontent.com/5777329/102633774-2c84f700-4151-11eb-8e3d-e95553540087.png) > (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](https://user-images.githubusercontent.com/5777329/102633901-5d652c00-4151-11eb-8637-127fd4d53d3e.png)
Author
Owner

@leduyquang753 commented on GitHub (Aug 30, 2024):

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.

@leduyquang753 commented on GitHub (Aug 30, 2024): 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](https://github.com/user-attachments/assets/361408e5-9b12-4039-8aaa-2f3cb5dca794) Not sure if this should be made a separate issue.
Author
Owner

@ghost commented on GitHub (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.

@ghost commented on GitHub (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](https://github.com/user-attachments/assets/fdbf30ff-13a5-44f6-86a5-c4aa753d58b8) Direct3D + Normal font weight: ![Image](https://github.com/user-attachments/assets/4172a654-f1e5-42bc-b943-c9045d9aea84) Direct2D + Medium font weight: ![Image](https://github.com/user-attachments/assets/ffc15d6f-63ca-44f0-84ae-44ed8b9d96d4) Direct2D + Normal font weight + Zoom x2 ![Image](https://github.com/user-attachments/assets/e27cb3f6-f4e7-4bfe-8aec-716e40b6be98) 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.
Author
Owner

@lhecker commented on GitHub (Nov 11, 2024):

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

@lhecker commented on GitHub (Nov 11, 2024): @grable are you sure you have the builtin glyph setting enabled? ![Image](https://github.com/user-attachments/assets/ebb7665d-7178-419a-b200-165b0d245b26)
Author
Owner

@ghost commented on GitHub (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 :/

@ghost commented on GitHub (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 :/
Author
Owner

@lhecker commented on GitHub (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.

@lhecker commented on GitHub (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.
Author
Owner

@ghost commented on GitHub (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.

@ghost commented on GitHub (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](https://github.com/user-attachments/assets/ca421328-c22f-46c6-aee7-62d945e96d2e) Expected: ![Image](https://github.com/user-attachments/assets/4185bd6a-0037-464f-8f8b-1f63fdf67c48) EDIT: A suggestion for the future could be some options to control how the box drawing is done, IE: line width, roundiness, etc.
Author
Owner

@lhecker commented on GitHub (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).

@lhecker commented on GitHub (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).
Author
Owner

@ghost commented on GitHub (Nov 11, 2024):

I think i will😃 Thank you again!

@ghost commented on GitHub (Nov 11, 2024): I think i will😃 Thank you again!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#8527