Skip to content
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

Add an option to toggle the width of ambiguous-width characters #153

Open
Tracked by #13392
tats-u opened this issue Apr 13, 2018 · 7 comments
Open
Tracked by #13392

Add an option to toggle the width of ambiguous-width characters #153

tats-u opened this issue Apr 13, 2018 · 7 comments
Labels
Area-Server Down in the muck of API call servicing, interprocess communication, eventing, etc. Area-Settings Issues related to settings and customizability, for console or terminal Help Wanted We encourage anyone to jump in on these. Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Conhost For issues in the Console codebase Product-Conpty For console issues specifically related to conpty Product-Terminal The new Windows Terminal.
Milestone

Comments

@tats-u
Copy link

tats-u commented Apr 13, 2018

This bug-tracker is monitored by Windows Console development team and other technical types. We like detail!

If you have a feature request, please post to the UserVoice.

Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues. Instead, send dumps/traces to [email protected], referencing this GitHub issue.

Please use this form and describe your issue, concisely but precisely, with as much detail as possible

  • Your Windows build number: (Type ver at a Windows Command Prompt)
    10.0.16299.371

  • What you're doing and what's happening: (Copy & paste specific commands and their output, or include screen shots)

  1. Set font to ”MS Gothic” or a Japanese monospace font
  2. Type ”■square□square” or another text that contains ambiguous-width characters like ”■” and ”┌”
  3. Ambiguous-with characters lap over the next characters to them
  • What's wrong / what should be happening instead:
    Some characters like ”■” and ”┌” has the same width as ASCII characters in latin fonts but double width in Japanese (and maybe some other languages) fonts. These characters are called ambiguous-weighted.

Other terminal emulator has the option to toggle the width of them but Windows Console doesn't.

EDIT: also see #16779

@tats-u tats-u changed the title Add an option to change ambiguous-weight charactors Add an option to toggle the width of ambiguous-weight charactors Apr 13, 2018
@zadjii-msft zadjii-msft added Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. backlog labels Apr 13, 2018
@zadjii-msft zadjii-msft added this to the Backlog milestone Apr 13, 2018
@bitcrazed bitcrazed changed the title Add an option to toggle the width of ambiguous-weight charactors Add an option to toggle the width of ambiguous-weight characters May 3, 2018
@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label May 17, 2019
@miniksa miniksa added Area-Server Down in the muck of API call servicing, interprocess communication, eventing, etc. Area-Settings Issues related to settings and customizability, for console or terminal Product-Conhost For issues in the Console codebase and removed Mass-Chaos labels May 17, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label May 18, 2019
@miniksa miniksa added the Product-Conpty For console issues specifically related to conpty label May 18, 2019
@zadjii-msft zadjii-msft added the Product-Terminal The new Windows Terminal. label Aug 5, 2021
@DHowett DHowett changed the title Add an option to toggle the width of ambiguous-weight characters Add an option to toggle the width of ambiguous-width characters Aug 5, 2021
@omar2205
Copy link

Any updates on this issue?

@zadjii-msft
Copy link
Member

Nope. We'll make sure to update this thread when there is. In the meantime, might I recommend the Subscribe button?
image
That way you'll be notified of any updates to this thread, without needlessly pinging everyone on this thread ☺️

@zadjii-msft zadjii-msft modified the milestones: Terminal Backlog, Backlog Jan 4, 2022
@pwang2
Copy link

pwang2 commented Feb 24, 2022

I was also pointed here when investigating a nerdfont icon cutoff case. ryanoasis/nerd-fonts#795

can we have the s_wideAndAmbiguousTable here to be configurable/overridable in settings.json

static constexpr std::array<UnicodeRange, 295> s_wideAndAmbiguousTable{

@j4james
Copy link
Collaborator

j4james commented Feb 24, 2022

Unless I've misread something, the character discussed in that nerd-fonts issue was U+FD42, which is defined as neutral (which is essentially narrow), rather than ambiguous width, so this option wouldn't help. Also note that U+FD42 is in the Arabic Presentation Forms-A block, and is defined as ARABIC LIGATURE RADI. I really don't understand how Nerd Fonts feel entitled to redefine large chunks of Unicode and then still complain when something doesn't work.

@pwang2
Copy link

pwang2 commented Feb 24, 2022

I don't think we need be nerve tense on this use of code block here. Nerd fonts is also an open source project which favored by a lot of people like me to get our nerdy life a little better giving this context that it is an aggregation of other open source fonts like Mdi, awesomefonts etc. It is not a problem of who get entitled, but just with a positive hope that things could be moving in a convergent way.

It is sad war day for the world. May the world peace as it deserves.

@Finii
Copy link

Finii commented Feb 25, 2022

@j4james

I really don't understand how Nerd Fonts feel entitled

Well, the glyphs have been placed in PUA in error several years ago when it seemed to not matter. There are efforts to move the glyphs to an appropriate region. This legacy is hard to tackle, though, with a user base that expects glyph codes to not change.
But it is the top priority for the next major release.

and then still complain when something doesn't work

'Nerd Font' is not complaining. Often it is the user that uses the wrong 'flavor' of patched font that causes issues; with all the terminal applications behaving differently it is hard to determine if the patching itself is the problem or some setting, or ...
And then I poke in different applications' code to see how the fonts need to be patched differently to work on the majority.

Maybe you are familiar with Windows Terminals code? What I fail to find out, can the font supply some information here:
https://github.com/microsoft/terminal/blob/main/src/types/CodepointWidthDetector.cpp#L445
And I do not know if _pfnFallbackMethod is set to anything useful (and to what?) in production builds?

Maybe you have a minute for some answers :-) Thank you.

@j4james
Copy link
Collaborator

j4james commented Feb 25, 2022

But it is the top priority for the next major release.

That's good to know. Thank you.

Maybe you are familiar with Windows Terminals code? What I fail to find out, can the font supply some information here:

No, I don't think that would help you. First off that only applies to ambiguous width characters, so it wouldn't effect something like U+FD42. And even if you were using an ambiguous width character, that fallback functionality is only used in conhost (the old Windows console), for legacy compatibility reasons.

A standard terminal shouldn't be varying the width of a character based on the font, because terminal applications would then have no way of knowing how much space a string of text was going to take. For example, an application wouldn't be able predicate when text is going to wrap, or how much to move the cursor when editing. If you don't get widths right, lots of things will break.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Server Down in the muck of API call servicing, interprocess communication, eventing, etc. Area-Settings Issues related to settings and customizability, for console or terminal Help Wanted We encourage anyone to jump in on these. Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Conhost For issues in the Console codebase Product-Conpty For console issues specifically related to conpty Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

8 participants