-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
Gaps between block elements when using Direct2D #17224
Comments
Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! Open similar issues:
Closed similar issues:
|
It seems that despite the fact that Direct2D provides graphics acceleration, builtin glyphs are not activated in this mode. If this is intended, then it would probably be worth rephrasing the "Builtin Glyphs On/Off" option description, specifically indicating the need for "Direct3D". terminal/src/renderer/atlas/AtlasEngine.h Lines 130 to 140 in 49e4eea
terminal/src/renderer/atlas/AtlasEngine.r.cpp Lines 281 to 299 in 49e4eea
|
Right... I wrote that "This feature only works when GPU Acceleration is available." text before I added the Graphics API setting (at which time that statement was mostly true), but now that doesn't work anymore of course. The question is, which one is best?
|
It seems to me that since the "Builtin Glyphs" option is completely dependent on the "Graphics API" option, it makes sense to make it a sub-option of the "Graphics API" option that becomes available when "Direct3D 11" is selected. I don't think the "Builtin Glyphs" option should necessarily be per-profile, as a global option it is quite appropriate for me. |
Oof that's a tricky one. Cause I'd expect it on the appearance page, but the renderer option doesn't really need to be on the appearance page. That's definitely an advance option. Maybe when d2d is enabled, we could disable the builtin glyphs menu item, and add a message box with a deeplink to the advanced page... but that sounds overly complicated. I guess making it a sub-item of the renderer entry is probably the most elegant solution |
I suspect most people will keep it on the default option "Automatic", in which case Direct2D is only used if the system lacks a GPU (or it's a very old GPU, but that's fairly rare nowadays). This is commonly the case when using RDP to remote into a server or VM. The reason I put the "Builtin Glyphs" option on the profile appearance page is because the font setting is per-profile and so I guess the builtin-glyph option (which overwrites glyphs in the font) should be per-profile too. The problem is that the settings UI doesn't really have any idea about this "Automatic" API choice. It could be hooked up of course, but I think that's somewhat annoying to do (different DLLs, with different components, on different threads, and it may change at any given moment = needs event hooks). The upside on the other hand is potentially fairly small, because >95% of users are using the Direct3D renderer anyway. Unless Dustin/Mike think about this differently, I think I'll only change the sub-text on the setting for now. If more people run into this issue (even just a few), I'll try to improve it by hooking up the render thread to the settings UI, or something similar. |
Unanimous team consent: It's just easier to add builtin glyph support to d2d rather than finagle the SUI to support this |
#17278) This implements builtin glyphs for our Direct2D renderer, as well as dashed and curly underlines. With this in place the only two features it doesn't support are inverted cursors and VT soft fonts. This allows us to remove the `_hack*` members introduced in a6a0e44. The implementation of dashed underlines is trivial, while curly underlines use quadratic bezier curves. Caching the curve as a sprite is possible, however I feel like that can be done in the future. Builtin glyphs on the other hand require a cache, because otherwise filling the entire viewport with shaded glyphs would result in poor performance. This is why it's built on top of `ID2D1SpriteBatch`. Unfortunately the API causes an eager flush of other pending graphics instructions, which is why there's still a decent perf hit. Finally, as a little extra, this fixes the rounded powerline glyph shapes being slightly cut off. The fix is to simply don't round the position and radius of the ellipsis/semi-circle. Closes #17224 ## Validation Steps Performed * RenderingTests.exe updated ✅ * All supported builtin glyphs look sorta right at different sizes ✅
#17278) This implements builtin glyphs for our Direct2D renderer, as well as dashed and curly underlines. With this in place the only two features it doesn't support are inverted cursors and VT soft fonts. This allows us to remove the `_hack*` members introduced in a6a0e44. The implementation of dashed underlines is trivial, while curly underlines use quadratic bezier curves. Caching the curve as a sprite is possible, however I feel like that can be done in the future. Builtin glyphs on the other hand require a cache, because otherwise filling the entire viewport with shaded glyphs would result in poor performance. This is why it's built on top of `ID2D1SpriteBatch`. Unfortunately the API causes an eager flush of other pending graphics instructions, which is why there's still a decent perf hit. Finally, as a little extra, this fixes the rounded powerline glyph shapes being slightly cut off. The fix is to simply don't round the position and radius of the ellipsis/semi-circle. Closes #17224 ## Validation Steps Performed * RenderingTests.exe updated ✅ * All supported builtin glyphs look sorta right at different sizes ✅ (cherry picked from commit 3486111) Service-Card-Id: 92572076 Service-Version: 1.21
Windows Terminal version
Current main
Windows build number
10.0.19045.4291
Other Software
No response
Steps to reproduce
System-wide scale and layout (display settings): 100%
WT PowerShell profile settings:
Type "▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄" at the pwsh prompt
"▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄"
Expected Behavior
Block elements are fused into a solid bar.
Actual Behavior
The text was updated successfully, but these errors were encountered: