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

Integrated terminal renders vertical gap between box characters #110039

Closed
l-c-g opened this issue Nov 5, 2020 · 6 comments
Closed

Integrated terminal renders vertical gap between box characters #110039

l-c-g opened this issue Nov 5, 2020 · 6 comments
Assignees
Labels
feature-request Request for new features or functionality terminal General terminal issues that don't fall under another label 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
Milestone

Comments

@l-c-g
Copy link

l-c-g commented Nov 5, 2020

  • VSCode Version: 1.50.1 (user setup)
  • OS Version: Windows 10 20H2, x64

Steps to Reproduce:

  1. Set up VS Code (both editor and integrated terminal) to use the same font as Windows Terminal (in my case 'RobotoMono NF')
  2. Make sure that terminal.integrated.lineHeight is set to 1 (so it does not add extra spacing)
  3. Open the integrated terminal
  4. Look at something that draws box characters, such as Far Manager or a multiline cursor like the one below:
┌ user@host  🕙 20:19:20
└ ~ ❯
  1. Notice the additional vertical space between lines in VS Code terminal:
    grafik
  2. Compare to the same characters rendering in Windows Terminal (version 1.3.2651.0 in my case):
    grafik

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

Additional information:

My Windows is set to 150% display scaling, the issue also occurs at 100% scaling. Interestingly, my Windows Terminal is configured to a font size 10, whereas VS Code needs 14 to achieve a similar font size.

@rzhao271 rzhao271 added terminal General terminal issues that don't fall under another label info-needed Issue requires more information from poster labels Nov 5, 2020
@rzhao271
Copy link
Contributor

rzhao271 commented Nov 5, 2020

Cannot reproduce with the font Cascadia Mono. Does the same issue show up for you with that font?

@Tyriar
Copy link
Member

Tyriar commented Nov 5, 2020

Using the webgl renderer might help with this: "terminal.integrated.rendererType": "experimentalWebgl"

But I think what you're really after is to not draw the box characters from the font at all and draw the box characters pixel perfect which is captured in xtermjs/xterm.js#2409

@Tyriar Tyriar added 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 feature-request Request for new features or functionality and removed info-needed Issue requires more information from poster labels Nov 5, 2020
@Tyriar Tyriar added this to the Backlog milestone Nov 5, 2020
@l-c-g
Copy link
Author

l-c-g commented Nov 5, 2020

Cannot reproduce with the font Cascadia Mono. Does the same issue show up for you with that font?

Interesting, I tried different fonts to rule out a problem with a particular font's metrics. Roboto Mono, DejaVu Mono, and Consolas all showed the same issue. However, Cascadia Mono does indeed render without the vertical gaps.

Using the webgl renderer might help with this: "terminal.integrated.rendererType": "experimentalWebgl"

It did not.

But I think what you're really after is to not draw the box characters from the font at all and draw the box characters pixel perfect which is captured in xtermjs/xterm.js#2409

It looks promising. But looking through the comments there, I remembered someting else that might be related. There seems to be some kind of weird clipping in VS Code's integrated terminal (in addition to a difference in font weight, even though I did not specify the weight in either program):
grafik
This also does not happen in Windows Terminal (set to a light color scheme to highlight the stroke on the clock symbol):
grafik

@Tyriar
Copy link
Member

Tyriar commented Nov 5, 2020

@l-c-g Windows Terminal may indeed do pixel perfect rendering. The clipping should be restricted to the canvas renderer (unless you're using an abnormally large glyph).

@l-c-g
Copy link
Author

l-c-g commented Nov 7, 2020

Windows Terminal may indeed do pixel perfect rendering.

Oh, I always thought that Windows Terminal and terminal in VS Code used the same renderer. That's why I kept comparing the two. I don't know why I started thinking that, though, and I never checked it.

The clipping should be restricted to the canvas renderer (unless you're using an abnormally large glyph).

Yes, I switched to the DOM renderer and the clock is no longer clipped at the top.

@Tyriar
Copy link
Member

Tyriar commented Nov 9, 2020

Oh, I always thought that Windows Terminal and terminal in VS Code used the same renderer

@l-c-g nope, WT is written in C++ from scratch and VS Code uses xterm.js. The only component they share is "conpty" that handles launching the shell.

Since we're doing issue grooming at the moment I'm going to close this in favor of xtermjs/xterm.js#2409. The clock being cut off should be restricted to the canvas renderer which we want to remove #106202

@Tyriar Tyriar closed this as completed Nov 9, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Dec 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality terminal General terminal issues that don't fall under another label 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
Projects
None yet
Development

No branches or pull requests

3 participants