why is the overline so much less thick than the underlines? #21056

Closed
opened 2026-01-31 07:31:53 +00:00 by claunia · 6 comments
Owner

Originally created by @ClaireCJS on GitHub (Jan 6, 2024).

Windows Terminal version

1.18.3181.0

Windows build number

10.0.19045.3803

Other Software

TCC 29.00.17 x64

Steps to reproduce

Overline and underline things at the same time.
image

Expected Behavior

The lines to be the same thickness

Actual Behavior

The underlines are thicker than the overlines. To the extent that at certain font sizes & colors (i.e. small & purple), you can see one, but not see the other, even though both are there.

image

Originally created by @ClaireCJS on GitHub (Jan 6, 2024). ### Windows Terminal version 1.18.3181.0 ### Windows build number 10.0.19045.3803 ### Other Software TCC 29.00.17 x64 ### Steps to reproduce Overline and underline things at the same time. ![image](https://github.com/microsoft/terminal/assets/789591/c31c7296-25b8-43f1-92ac-999a685042e1) ### Expected Behavior The lines to be the same thickness ### Actual Behavior The underlines are thicker than the overlines. To the extent that at certain font sizes & colors (i.e. small & purple), you can see one, but not see the other, even though both are there. ![image](https://github.com/microsoft/terminal/assets/789591/799bd06a-d4c1-4b17-af93-407213cad1ed)
claunia added the Needs-TriageIssue-Bug labels 2026-01-31 07:31:53 +00:00
Author
Owner

@ClaireCJS commented on GitHub (Jan 6, 2024):

Please forgive me for the pettiest bug report of all time. This just seriously bugs me.

@ClaireCJS commented on GitHub (Jan 6, 2024): Please forgive me for the pettiest bug report of all time. This just seriously bugs me.
Author
Owner

@j4james commented on GitHub (Jan 6, 2024):

This is intentional. They're two separate concepts. The underline style is a feature of the font, so its width will vary depending on what font you're using. The overline is just one of the "grid lines" that border all sides of the cell. Traditionally those lines have always been a single pixel, so we've tried to remain reasonably compatible with that usage. It does now scale if you're using a high DPI display or a large font size, but it isn't expected to match the underline width.

@j4james commented on GitHub (Jan 6, 2024): This is intentional. They're two separate concepts. The underline style is a feature of the font, so its width will vary depending on what font you're using. The overline is just one of the "grid lines" that border all sides of the cell. Traditionally those lines have always been a single pixel, so we've tried to remain reasonably compatible with that usage. It does now scale if you're using a high DPI display or a large font size, but it isn't expected to match the underline width.
Author
Owner

@j4james commented on GitHub (Jan 6, 2024):

That said, you could argue that maybe the base size of these grid lines should be wider (I think it's currently 0.025em), but we need to be careful that we're not breaking backwards compatibility with the original single pixel expectation. Grid lines are more commonly used in "East Asian" locales, where the glyphs tend to occupy a large portion of the cell, so you're at risk of overlapping the text if the grid lines are too wide.

@j4james commented on GitHub (Jan 6, 2024): That said, you could argue that maybe the base size of these grid lines should be wider (I think it's currently 0.025em), but we need to be careful that we're not breaking backwards compatibility with the original single pixel expectation. Grid lines are more commonly used in "East Asian" locales, where the glyphs tend to occupy a large portion of the cell, so you're at risk of overlapping the text if the grid lines are too wide.
Author
Owner

@237dmitry commented on GitHub (Jan 6, 2024):

The lines to be the same thickness

In my opinion they are the same thickness:

Screenshot 2024-01-06 203550

@237dmitry commented on GitHub (Jan 6, 2024): > The lines to be the same thickness In my opinion they are the same thickness: ![Screenshot 2024-01-06 203550](https://github.com/microsoft/terminal/assets/78153320/f48504b1-04de-4fce-8949-235082e432a5)
Author
Owner

@lhecker commented on GitHub (Jan 8, 2024):

@237dmitry It depends on your DPI / display scale and font size. DxRenderer (old text renderer) uses 0.025em for its thin lines. That is, for a font size of 12pt you get 0.3px thick lines (here I mean pt and px as CSS units in 96 DPI, aka 100% display scale). At 300% scale like in the original comment above, it would still result in <1px thick lines, which is then forcefully rounded up to a min. of 1px.

The newer AtlasEngine uses half the underline width as the width for thin lines, as this happens to match Word's approach for double-underlines. This may result in thicker 2px lines for @ClaireCJS depending on whether their 1.5px thickness gets rounded up or down.

@lhecker commented on GitHub (Jan 8, 2024): @237dmitry It depends on your DPI / display scale and font size. DxRenderer (old text renderer) uses 0.025em for its thin lines. That is, for a font size of 12pt you get 0.3px thick lines (here I mean pt and px as CSS units in 96 DPI, aka 100% display scale). At 300% scale like in the original comment above, it would still result in <1px thick lines, which is then forcefully rounded up to a min. of 1px. The newer AtlasEngine uses half the underline width as the width for thin lines, as this happens to match Word's approach for double-underlines. This may result in thicker 2px lines for @ClaireCJS depending on whether their 1.5px thickness gets rounded up or down.
Author
Owner

@j4james commented on GitHub (Jan 8, 2024):

@lhecker I knew the AlasEngine used a different algorithm for double underlines, but I wasn't aware that it was using that same "thin line" width for grid lines. That's possibly not a good idea. Does Word really use grid lines like that as well?

Not that it matters as things are now, since the only grid line that works in Windows Terminal is the overline, but if we ever got full grid line support, I would think a width derived from the underline style could be more risky.

@j4james commented on GitHub (Jan 8, 2024): @lhecker I knew the AlasEngine used a different algorithm for double underlines, but I wasn't aware that it was using that same "thin line" width for grid lines. That's possibly not a good idea. Does Word really use grid lines like that as well? Not that it matters as things are now, since the only grid line that works in Windows Terminal is the overline, but if we ever got full grid line support, I would think a width derived from the underline style could be more risky.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21056