-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
AtlasEngine rendering wide Nerd Font glyphs incorrectly #14022
Comments
same here |
I gave this issue a title that will hopefully make it easier to find in the future. 🙂 FYI I'm currently working on a version of AtlasEngine that solves this issue fundamentally, by going with a more traditional text rendering approach, allowing for freely overlapping glyphs. My prototype is already capable of handling all Nerd Font glyphs correctly. |
You could probably do that in two passes. |
That would mean I'd have to keep both, the complexity of our current approach and add the complexity of the new approach for fallback. That would probably make maintainability more difficult than a larger one time change. An idea I had to keep some of the current benefits was to just composite all text into a viewport-sized offscreen texture and blend it onto the swap chain in a single final shading pass, similar to how we do it now. |
I don't think you need to fall back on per glyph rendering to solve the special wide glyphs needed for proper nerdfont icons rendering. I understand that the speed difference is not significant, IMHO your solution is more complex than doing two passes with shader on a quad. First pass as already done. (Ignoring wider glyphs) It might even be possible to do everything in a single pass shader, but that should be tested. |
When we render we need to conceptually draw in "layers" from bottom to top and AtlasEngine did it in 1 pass:
But in order to draw wide glyphs in between we can't draw in 2 passes. We need 3, since things like sixels or selections are "on top" of the lower contents. From what I can see it basically turns into:
† optional if no 2nd pass This is my new approach:
Additionally it actually reduces the amount of code required for text rendering by ~12% (it's just that the remaining code requires more intimate knowledge about DirectWrite and Direct3D). And I think I even know how to merge both to draw them in just a single pass all the time. As such right now I personally don't agree that keeping both approaches simultaneously offers a strong benefit. |
The more I think about it the more I think that the whole rendering can be entirely done in one single shader pass. But that does require a bit of preprocessing and adding metadata for each cell to handle all the cases. But of course, given that performance gains are not critical (the optimal solution would be a bit more power efficient) you should simply follow your guts and go for the solution that is the simpler to implement for you. |
Thanks for your input! I'll definitely try my hardest to come up with something decent. Nothing is set in stone so far. 🙂 |
You can disable the new atlas renderer in the settings, if that solves your issue then it is related. |
Yeah, disabling Atlas fixes the problem. Welp, it worked for almost 14 days with the prior version. It had a good run :) Will try Atlas again once this issue here is all fixed. |
@jessey-git I'm sorry I broke your font! 😔 I hope you don't mind me saying this, but your font is... weird. 😄 Basically, IMO Nerd Fonts should stop making block glyphs taller than the font's advance height. |
I was seeing the same rendering issue with the Powerline Extra block of glyphs, which was reported upstream: This was resolved by a commit in their patcher ryanoasis/nerd-fonts#1123 After using the latest version of my font, their patcher, and Terminal, at least those glyphs in my chosen fonts seem to render as expected now. People in this thread may want to try them as well to get their renders back to how they looked before. |
Windows Terminal version
1.16.2523.0
Windows build number
10.0.19044
Other Software
UbuntuMono Nerd font installed from https://github.com/ryanoasis/nerd-fonts/releases/download/v2.2.2/Ubuntu.zip
WSL, running Ubuntu 20.04.1 LTS. SSHing into a RHEL server
The linux server is running tmux with custom status bar with "double wide" icon characters
Steps to reproduce
Use UbuntuMono Nerd Font and configure some double wide character in status bar or print them in terminal
Issue is seen with new AtlasEngined enabled(which is default with new version). Disabling AtlasEngine will bring back old behaviour
Expected Behavior
Double wide characters such as clock, calender which are available in NerdFond are to be rendered as below
Actual Behavior
The text was updated successfully, but these errors were encountered: