-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Incorrect full-width char rendering #17016
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
That's the old "conhost", also known as "Console Window Host" or similar names. Windows Terminal is only the application with tabs. However, that screenshot is excellent because it reveals what is going on. If you zoom in you can see how after each wide character you have a weird glyph: I believe you're accidentally writing "garbage" / invalid characters into your output. So far we just happened to ignore them but it seems that now we don't. I think this may be caused by #16825 which was an intentional change. Could you check with a debugger what characters you're actually writing to the console / terminal? It'd be nice if you could post them here or send us a screenshot! |
See also gui-cs/Terminal.Gui#2928 |
Thanks for the clarify! I created a demo project using Terminal.GUI and set one label to some CJK chars: dotnet new --install Terminal.Gui.templates
dotnet new tui -n myproj
cd myproj
...
this.label1.Text = "こんにちは";
... dotnet run As I dig into issues with that library I found gui-cs/Terminal.Gui#2943 and gui-cs/Terminal.Gui#2928. It seems this is an ongoing issue on their side. Directly running their demo produces the same result:
I'm not quite familiar with that library's underlying mechanics, so I will open an issue in their repo and close this for now. If there's further issue addressed with wt I will reopen it and add new comments. Thank you for your time and effort in helping me locate the real issue! |
Yes I'm looking into it |
Windows Terminal version
1.19.10821.0
Windows build number
10.0.19045.0
Other Software
SonicLair.Cli@1.2.0 which uses:
Terminal.Gui@1.6.4
Font is attached:
Sarasa Term SC Light Nerd Font Complete.zip
Steps to reproduce
Fire up an application with Terminal.GUI which renders full-width characters using a monospaced font.
I calculate what's the actual length the terminal should render, which shouldn't be the problem:
SonicLair.Cli/Tools/StringExtension.cs
Expected Behavior
This is a screenshot at
1.19.10302.0
:This is a screenshot using Windows's terminal:
Actual Behavior
This is a screenshot at
1.19.10821.0
:It can be inferred that wt renders three instead of two single-char-width when rendering full-width characters.
Also, the first line is missing. I'm not quite sure whether this is related...
P.S. AtlasEngine is enabled for both versions
The text was updated successfully, but these errors were encountered: