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) is too small #5893

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

Kubernetes helm symbol ⎈ (U+2388) is too small #5893

gitfool opened this issue May 13, 2020 · 6 comments
Labels
Issue-Question For questions or discussion Needs-Tag-Fix Doesn't match tag requirements Resolution-Answered Related to questions that have been answered

Comments

@gitfool
Copy link

gitfool commented May 13, 2020

Environment

Windows build number: 10.0.19041.0
Windows Terminal version (if applicable): 0.11.1333.0

Steps to reproduce

Compare the Kubernetes helm symbol ⎈ (U+2388) in Visual Studio Code & Windows Terminal.

Expected behavior

The symbol should be double width.

Actual behavior

The symbol is displayed using single width and is too small.

Visual Studio Code:
image

Windows Terminal:
image

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels May 13, 2020
@j4james
Copy link
Collaborator

j4james commented May 13, 2020

Here's what U+2388 looks like in XTerm, Gnome Terminal, Konsole, Alacritty, Kitty, and Mintty.

image

Unless there's been a recent change to the width in the latest Unicode standard, I think it's probably meant to be narrow.

@DHowett-MSFT
Copy link
Contributor

DHowett-MSFT commented May 13, 2020

I agree.

I hate to call others out, but these Nerd Fonts are stomping all over the "unicode private use area" and expecting everybody to, well, treat them the same way. Those areas are "private use" for a reason :/

EDIT: So, 2588 is absolutely not in the PUA. I'm sorry about that. Read below for more details on why we think this is "hard" 😄

@DHowett-MSFT DHowett-MSFT added Issue-Question For questions or discussion Resolution-Answered Related to questions that have been answered and removed Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels May 13, 2020
@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label May 13, 2020
@gitfool
Copy link
Author

gitfool commented May 13, 2020

To be fair, I don't think this has anything to do with Nerd Fonts. The symbol is coming straight from Fira Code, unless I'm missing something.

As I linked to above, the Fira Code font has defined the symbol as double width. Shouldn't that be respected?

@DHowett-MSFT
Copy link
Contributor

Ah, it's also fair that 2588 isn't IN the PUA. Sorry about that.

So, this comes up a lot. It's... not pleasant.

Applications connected to the client side of a console (or terminal!) need to be able to do column-counting. To do so, most of them either use inbuilt character tables or something like wcwidth (from libc). It's not a great API, but it is the one we have.

Unfortunately, there's no requirement that a character be presented. Anywhere! Subsequently, there's no affordance in wcwidth for a "presentation" measurement, like the one that would come from a font. The only thing that can be used to make the size decision for a codepoint is the intrinsic specified-in-the-Unicode-standard properties of that codepoint.

@gitfool
Copy link
Author

gitfool commented May 13, 2020

That makes sense. Thanks for the clarification!

@DHowett-MSFT
Copy link
Contributor

DHowett-MSFT commented May 13, 2020

Sorry -- consider this a ramble. You're not required to read it 😄

Consider the case of Kubernetes sitting at the remote end of an SSH session. Say something prints the ⎈ symbol and wants to determine how much space is left in the line...

It's over SSH, and very far removed from the presentation surface that might be making the decision on how big it is. That's not a tenable position for it to be in, because it can't make that space determination without information known only to the application sitting on the other end of its PTY.

Even if we, and the rest of the text-mode community, plumbed through support for glyph presentation impacting width, who would answer that question?

+----------+
|          |
| Terminal |
|          |
+-+------+-+
  |      ^
  v      |
+-+------+-+
|          |
| ssh.exe  |
|          |
+-+------+-+
  |      ^
  v      |
+-+------+-+     +----------+     +----------+
|          |     |          |     |          |
|   sshd   +<----+ unix pty +<----+ K8s CLI  |
|          |     |          |     |          |
+----------+     +----------+     +----------+

Any determination would have to make it through all of those layers and back down, synchronously, when the K8s CLI asks how big a glyph is.

This is a hot button topic over on the terminal working group tracker! 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Question For questions or discussion Needs-Tag-Fix Doesn't match tag requirements Resolution-Answered Related to questions that have been answered
Projects
None yet
Development

No branches or pull requests

3 participants