-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
![image](https://private-user-images.githubusercontent.com/38759782/319596621-0755c5c6-2f73-4db6-8b34-7ab06f36413a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUwODY2NjksIm5iZiI6MTcyNTA4NjM2OSwicGF0aCI6Ii8zODc1OTc4Mi8zMTk1OTY2MjEtMDc1NWM1YzYtMmY3My00ZGI2LThiMzQtN2FiMDZmMzY0MTNhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODMxVDA2MzkyOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTEzNWU0ODViZDAxMjJhYjg0YjE4MGZiNTFjNjA2OTYwZGNjNDM0ZDgxNTdkNzU2Y2M4NmM5ZTY5YzI0ODI3NTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.pe6JvDnVV4Kv-4hBoI6mVvD5sosdDMcJTwNFv692YKo)
1.19.10302.0
:This is a screenshot using Windows's terminal:
![image](https://private-user-images.githubusercontent.com/38759782/319599117-bdb2a549-3964-4971-847c-f9675665c6e8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUwODY2NjksIm5iZiI6MTcyNTA4NjM2OSwicGF0aCI6Ii8zODc1OTc4Mi8zMTk1OTkxMTctYmRiMmE1NDktMzk2NC00OTcxLTg0N2MtZjk2NzU2NjVjNmU4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODMxVDA2MzkyOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFmNDNmYzEyNmQwOWFjNjU2YTMzZWRjYTU5MjZmMjEyNjA2ZGUwYWU3NzI2ODc1OGNiOTZjNzcyNTk3NDQ1M2QmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.3kUM_janHrWJI5q9qg4ALvajFF-GZETAwTOgknzVDK4)
Actual Behavior
This is a screenshot at
![image](https://private-user-images.githubusercontent.com/38759782/319596683-abd2355c-ff29-4324-832a-b53b6543655f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUwODY2NjksIm5iZiI6MTcyNTA4NjM2OSwicGF0aCI6Ii8zODc1OTc4Mi8zMTk1OTY2ODMtYWJkMjM1NWMtZmYyOS00MzI0LTgzMmEtYjUzYjY1NDM2NTVmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODMxVDA2MzkyOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQzMjlkNGY4YTQyNWFmOWNlNjMwMDQ5ZjY0ZWZhOGZkMjY5ZWU3OWMwNjQzN2E5MTI1NWJiMDUwOGY2YTI3ODEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.c-iRIf-YwdEOKySAPloj3EfsP66zKX7a1Q1qqhawSmY)
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: