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

Kubernetes helm symbol ⎈ (U+2388) should be single width #1036

Closed
gitfool opened this issue May 13, 2020 · 9 comments
Closed

Kubernetes helm symbol ⎈ (U+2388) should be single width #1036

gitfool opened this issue May 13, 2020 · 9 comments
Milestone

Comments

@gitfool
Copy link

gitfool commented May 13, 2020

Following up from microsoft/terminal#5893, it seems that the helm symbol ⎈ (U+2388) should be single width.

I can appreciate from a UI rendering POV, like with Visual Studio Code, it may well look better with double width. (Was that the reason for af1c556?) From both a Unicode standard and Terminal POV, however, it looks like the wrong choice.

I love this font as much as I love Kubernetes, so is there any chance this symbol could be reworked to be single width and thereby play nice with terminals? 😁

@tonsky
Copy link
Owner

tonsky commented May 14, 2020

I don’t understand. In the issue you link to, helm being small is the problem. You want me to make it even smaller?

@gitfool
Copy link
Author

gitfool commented May 14, 2020

It's small in the Terminal because it's defined as double width in Fira Code but treated as single width based on the only information available to it; i.e. Terminal does not know any better since it can't consult the font info. So if Fira Code defines the symbol within a single width, as defined by other fonts and the Unicode standard, then the symbol will not get squeezed to fit in a single width space.

@tonsky
Copy link
Owner

tonsky commented May 14, 2020

Ah, I see! So Terminal doesn’t know how to render double-width chars? Ok but if I squeeze it into 1-width char it will be just as small as it’s displayed now. Would that work for you?

@tonsky
Copy link
Owner

tonsky commented May 14, 2020

Basically nothing will change :) Except in VS Code and other editors it will become small too

@DHowett-MSFT
Copy link

So, this is why I'm a bit concerned. Terminal well knows how to render double-width characters, but everything we can find on the matter suggests that U+2388 is supposed to be narrow. Here's what it says in the UCD.

PS> $ucd=[xml](gc .\ucd.nounihan.flat.xml)
PS> $helm=($ucd.ucd.repertoire.char | ? cp -eq 2388)
PS> $helm|ft cp,ea,Emoji,ExtPict

cp   ea Emoji ExtPict
--   -- ----- -------
2388 N  N     Y

With ea=N (neutral = narrow for non-ea) and emoji=N, we have nothing to go on to enforce it as being 2-wide.

emoji-sequences also doesn't contain it (even with a modifier that says it should be rendered wide.)...

@DHowett-MSFT
Copy link

(We unfortunately have to have a consistent definition of characters as 1 or 2 cells, like other terminal emulators, to make sure that connected text-mode applications have a consistent view of the screen buffer as us 😄)

@gitfool
Copy link
Author

gitfool commented May 14, 2020

@tonsky it will still be small, yes, but it won't be scaled to be smaller than it should be, since both Fira Code and Terminal will agree on expected width. See microsoft/terminal#5893 (comment) for screenshots with a different font showing the helm character filling the cell for a single width character.

@gitfool
Copy link
Author

gitfool commented May 14, 2020

Thinking about this some more, I guess it won't be scaled the way I was initially thinking, and the only thing Fira Code could do is to rework the symbol to look better given the constraints of a single width character. Sound right?

@tonsky
Copy link
Owner

tonsky commented May 14, 2020

@DHowett-MSFT That’s what I meant. Can’t have this from font info, as other people could be using other fonts and then columns will shift etc.

@gitfool There’s really not much design space to explore, as a circle is a circle. It will be just as small as all other circles, exactly 2x smaller than now and completely illegible. That’s what pushed me to make it 2-letter wide in the first place. I didn’t know about terminals limitations back then.

I will scale it down, but don’t expect miracles. It will look as crappy as it does in your second screenshot :)

Thanks for reporting!

@tonsky tonsky modified the milestones: 4, 5 May 14, 2020
@tonsky tonsky closed this as completed in 176cecd Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants