-
Notifications
You must be signed in to change notification settings - Fork 9k
AtlasEngine: Improve dotted, dashed and curly underlines #16719
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
Conversation
src/renderer/atlas/BackendD3D.cpp
Outdated
| std::array<u32, 0x100> codepoints; | ||
| std::array<u16, 0x100> indices; | ||
| std::array<u32, 0xA0> codepoints; | ||
| std::array<u16, 0xA0> indices; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happened here?
| if (const auto idx = indices[i]) | ||
| if (idx) | ||
| { | ||
| fontFaceEntry.boxGlyphs.insert(idx); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these probably conflict, don't they :D
|
I've force-merged this PR because the ARM64 build was stuck with "Artifact ... already exists for build ...". |
This changeset makes 3 improvements: * Dotted lines now use a 2:1 ratio between gaps and dots (from 1:1). This makes the dots a lot easier to spot at small font sizes. * Dashed lines use a 1:2 ratio and a cells-size independent stride. By being cell-size independent it works more consistently with a wider variety of fonts with weird cell aspect ratios. * Curly lines are now cell-size independent as well and have a height that equals the double-underline size. This ensures that the curve isn't cut off anymore and just like with dashed lines, that it works under weird aspect ratios. Closes #16712 ## Validation Steps Performed This was tested using RenderingTests using Cascadia Mono, Consolas, Courier New, Lucida Console and MS Gothic. (cherry picked from commit 9c8058c) Service-Card-Id: 91922825 Service-Version: 1.19
This changeset makes 3 improvements: * Dotted lines now use a 2:1 ratio between gaps and dots (from 1:1). This makes the dots a lot easier to spot at small font sizes. * Dashed lines use a 1:2 ratio and a cells-size independent stride. By being cell-size independent it works more consistently with a wider variety of fonts with weird cell aspect ratios. * Curly lines are now cell-size independent as well and have a height that equals the double-underline size. This ensures that the curve isn't cut off anymore and just like with dashed lines, that it works under weird aspect ratios. Closes #16712 ## Validation Steps Performed This was tested using RenderingTests using Cascadia Mono, Consolas, Courier New, Lucida Console and MS Gothic. (cherry picked from commit 9c8058c) Service-Card-Id: 91922826 Service-Version: 1.20
|
Am I correct in the assumption that different styles for underlining are still not considered, well, a standard? Simply something that some terminal emulators added on their own? So, what's the proper way to use them in WT? Like, with PowerShell? |
|
A significant portion of "standards" are actually just "things that most terminals agree on" and not actually standardized. If you want to go for maximum compatibility, you should only use straight ( |
|
True, it's more a "standard" and not a standard, should've made that more clear. I think I found it:
Colors for underline styles seem to work as well, nice! The trick is that you need But it seems that is the case.. |


This changeset makes 3 improvements:
This makes the dots a lot easier to spot at small font sizes.
By being cell-size independent it works more consistently with a
wider variety of fonts with weird cell aspect ratios.
height that equals the double-underline size.
This ensures that the curve isn't cut off anymore and just like
with dashed lines, that it works under weird aspect ratios.
Closes #16712
Validation Steps Performed
This was tested using RenderingTests using Cascadia Mono, Consolas,
Courier New, Lucida Console and MS Gothic.