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

Terminal DOM renderer clips the top of the cell, cutting off tall glyphs like U+23A1 ⎡ #172504

Open
thchr opened this issue Jan 26, 2023 · 12 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug confirmed Issue has been confirmed by VS Code Team member terminal-rendering upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-linked This is an upstream issue that has been reported upstream windows VS Code on Windows issues
Milestone

Comments

@thchr
Copy link

thchr commented Jan 26, 2023

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.74.3
  • OS Version: Windows_NT x64 10.0.22621

Problem:

The VSCode terminal display of Unicode characters U+23A1 () and U+23A4 () is mangled and looks more similar to U+23A2 or U+23A5 instead (). These characters are helpful in rendering matrices properly.

Steps to Reproduce:

  1. Paste ⎡ ⎤ into the VSCode terminal: observe that they are wrongly rendered:
    image
  2. Compare with e.g. Windows Terminal:
    image
@thchr thchr changed the title Terminal display of matrix bracket characters erroneous Terminal display of matrix bracket characters is mangled Jan 26, 2023
@meganrogge
Copy link
Contributor

works for me on mac for all values of terminal.integrated.gpuAcceleration on insider's

rendering.mov

@meganrogge
Copy link
Contributor

does not work on windows

@meganrogge meganrogge added the windows VS Code on Windows issues label Jan 26, 2023
@meganrogge
Copy link
Contributor

xtermjs/xterm.js#2693

@Tyriar
Copy link
Member

Tyriar commented Jan 26, 2023

Works for me on Windows on all renderers:

image

@Tyriar Tyriar added this to the Backlog milestone Jan 26, 2023
@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug and removed windows VS Code on Windows issues labels Jan 26, 2023
@meganrogge meganrogge added confirmed Issue has been confirmed by VS Code Team member windows VS Code on Windows issues and removed confirmation-pending labels Jan 26, 2023
@meganrogge
Copy link
Contributor

all renderers on windows

image (6)

@Tyriar
Copy link
Member

Tyriar commented Jan 26, 2023

@meganrogge dom too? What's your font family, line height, etc.?

@meganrogge
Copy link
Contributor

Also dom and I don't set font or line height

@Tyriar
Copy link
Member

Tyriar commented Jan 26, 2023

Can repro when I unset fontFamily:

image

image

This is somewhat expected because of the weird vertical offset with this font:

image

  • Hack: good
  • Consolas: bad
  • Courier New: bad

Even ddg and other websites clip this:

image

https://unicode-table.com/en/23A1/

image

@Tyriar
Copy link
Member

Tyriar commented Jan 26, 2023

It's working on all but the first line on the webgl renderer which makes sense. Not sure how to action this issue, but an easy workaround is switching fonts to one that doesn't vertically offset this char.

@Tyriar Tyriar added the under-discussion Issue is under discussion for relevance, priority, approach label Jan 26, 2023
@meganrogge
Copy link
Contributor

Should we set a default font family for ppl so that the majority won't encounter this issue?

@Tyriar
Copy link
Member

Tyriar commented Jan 26, 2023

That's a pretty big impact/scary change, we would only want to do that if we changed the default monospace font everywhere

@Tyriar Tyriar added upstream Issue identified as 'upstream' component related (exists outside of VS Code) and removed under-discussion Issue is under discussion for relevance, priority, approach labels Dec 10, 2024
@Tyriar Tyriar changed the title Terminal display of matrix bracket characters is mangled Terminal DOM renderer clips the top of the cell, cutting off tall glyphs like U+23A1 ⎡ Dec 10, 2024
@Tyriar
Copy link
Member

Tyriar commented Dec 10, 2024

Upstream: xtermjs/xterm.js#5240

The fact that this is cut off for the webgl renderer on the first line only is by design.

@Tyriar Tyriar added the upstream-issue-linked This is an upstream issue that has been reported upstream label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug confirmed Issue has been confirmed by VS Code Team member terminal-rendering upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-linked This is an upstream issue that has been reported upstream windows VS Code on Windows issues
Projects
None yet
Development

No branches or pull requests

3 participants