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

New terminal lines rendering cuts off bottom/top of characters like underscore #35901

Closed
viktorku opened this issue Oct 9, 2017 · 98 comments · Fixed by #84440
Closed

New terminal lines rendering cuts off bottom/top of characters like underscore #35901

viktorku opened this issue Oct 9, 2017 · 98 comments · Fixed by #84440
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug terminal Integrated terminal issues 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

@viktorku
Copy link

viktorku commented Oct 9, 2017

The new terminal rendering cuts off the bottom part of "long" characters, such as g, j and y.

1.17.0:
image

1.17.1:
image

  • VSCode Version: 1.17.0
Version 1.17.0
Commit be377c0faf7574a59f84940f593a6849f12e4de7
Date 2017-10-04T23:33:45.303Z
Shell 1.7.7
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64
  • OS Version: Ubuntu Trusty 14.04

Steps to Reproduce:

  1. Open the Terminal
  2. Start typing git checkout -b feature/object

Reproduces without extensions: Yes

@vscodebot vscodebot bot added the new release label Oct 9, 2017
@vscodebot vscodebot bot added the terminal Integrated terminal issues label Oct 9, 2017
@fpauser
Copy link

fpauser commented Oct 9, 2017

Same problem here.

@ghost
Copy link

ghost commented Oct 9, 2017

similar to #35794 but on fedora it cuts off the top part

@masonj5n
Copy link

masonj5n commented Oct 9, 2017

Chops the top off on Fedora 26.
badterminal

@imgss
Copy link

imgss commented Oct 10, 2017

Same problem here.

@ivcosla
Copy link

ivcosla commented Oct 10, 2017

I just changed the "terminal.integrated.fontFamily" value. My issue was that underscores were not displayed using DejaVu Sans Mono. With other fonts they are displaying, not sure if it would help to fix your problem guys, but sure is worth to give it a try.

@jashworth
Copy link

jashworth commented Oct 10, 2017

The variable width font that I'm partial to now renders like this.

image

@Tyriar
Copy link
Member

Tyriar commented Oct 10, 2017

@imgss see #35660
@jashworth see #35681

@Tyriar Tyriar added the bug Issue identified by VS Code Team member as probable bug label Oct 10, 2017
@Tyriar
Copy link
Member

Tyriar commented Oct 10, 2017

@viktorku what's in your settings.json file?

@viktorku
Copy link
Author

viktorku commented Oct 11, 2017

In 1.17.1 the rendering changed (it's somewhat blurrier and smaller fontsize - see top comment for comparison) but the bug prevails:

image

@Tyriar This also happens for a fresh code instance (without settings.json in the project's root .vscode). My User Settings are like this:

{
    "workbench.sideBar.location": "left",
    "files.exclude": {
        "**/.git*": false,
        "**/.svn": true,
        "**/.hg": true,
        "**/.DS_Store": true,
        "**/.tags*": true,
	"**/.pyc": true,
        ".catkin_tools/**/packages": true,
        "build": true,
        "devel": true,
        "logs": true,
        "src/external": true,
        "**/CMakeLists.txt.user": true,
        "**/__pycache__": true
    },

    "editor.fontSize": 12,
    "editor.tabSize": 2,
    "editor.wordWrap": "on",
    "editor.rulers": [
        100
    ],

    "[python]": {
        "editor.tabSize": 4
    },

    "files.trimTrailingWhitespace": true,
    "diffEditor.ignoreTrimWhitespace": false,

    "workbench.editor.enablePreviewFromQuickOpen": false,

    "window.zoomLevel": 0,

    "clang-format.executable": "/usr/bin/clang-format-3.8",
    "clang-format.style": "Google",
    "clang-format.language.javascript.enable": false,

    "prettier.printWidth": 100,
    "prettier.singleQuote": true,
    "prettier.bracketSpacing": true,
    "workbench.colorTheme": "One Dark Pro",

    "editor.multiCursorModifier": "alt",
    "git.ignoreLegacyWarning": true,
    "workbench.startupEditor": "newUntitledFile",

    "eslint.nodePath": "/home/viktor/.nvm/versions/node/v7.4.0/bin/node",

    "python.linting.pylintArgs": [
        "--load-plugins pylint-django"
    ]
}

@viktorku viktorku changed the title New terminal rendering lines cut off bottom of long characters New terminal lines rendering cuts off bottom of long characters Oct 11, 2017
@mpartipilo
Copy link

Similar issue. Image here: #36322 (comment)

@Tyriar
Copy link
Member

Tyriar commented Oct 18, 2017

Using the insiders build I believe you can workaround this currently by setting:

"terminal.integrated.lineHeight": 1.1

@CoenraadS
Copy link
Contributor

CoenraadS commented Oct 31, 2017

@Tyriar

The line height workaround doesn't work for me in latest insiders

Running Ubuntu in virtualbox

  • VSCode Version: Code - Insiders 1.18.0-insider (81cca6c, 2017-10-31T06:24:27.011Z)
  • OS Version: Linux x64 4.10.0-37-generic

In my screenshot I typed some underscores _________
image

I also tried crazy heights like 2 but nothing seems to help

This is a regression from 1.17 where it displays fine:
image

Setting terminal.integrated.fontSize": 13 is a workaround for me

@simon387
Copy link

simon387 commented Nov 3, 2017

yeah, fixed on fedora26 VSC 1.17.2 Shell 1.7.7 with the terminal.integrated.fontSize option

@DannyMexen
Copy link

Ubuntu 17.10 here and terminal.integrated.fontSize solved it. Thanks, everyone.

@kwahab
Copy link

kwahab commented Sep 22, 2019

Simply setting terminal font to Hack on Kubuntu 18.04 fixed it for me.
"terminal.integrated.fontFamily": "Hack"

@Remzi1993
Copy link

When gets this fixed? It's a issue from 2 years ago already!
I don't understand why it's not a priority.

Setting: terminal.integrated.fontSize to 15 fixed the issue.
Maybe, make this font size the default? This could be an option.

@Kryptoxic
Copy link

I work a lot in a linux environment compared to windows environment so when changing over from windows, I always get irritated that I cant see the underscores and I see that this has been going on for two years already. Commenting so I can follow this issue to see it fixed.

@ghost
Copy link

ghost commented Oct 1, 2019

I'm not using vscode, but I'm seeing this issue on ArchLinux in both Chromium and Hexchat with certain font-sizes only, but not only with DejaVu Sans Mono (Book) but also with Noto Sans Mono but way less visible. Tested for chars: qpjy_. With Noto the underscore is always visible, but other chars can be seen cut off a bit.

Inconsolata(and/or Nimbus Mono PS too) font however seems to exhibit no such issues. Hence why I'm switching my Monospace font to it.

$ fc-match monospace
Inconsolata-Regular.ttf: "Inconsolata" "Regular"

This here is an interesting read as to why this descenders cut off might be happening.
Another interesting comment with some workarounds possibly.

@bprosnitz
Copy link

Setting font size to 13.9 (from the default of 14) fixed underscores for me.

@Tyriar
Copy link
Member

Tyriar commented Oct 10, 2019

The current thing blocking this is stabilizing the WebGL renderer, see upstream query: https://github.com/xtermjs/xterm.js/issues?q=is%3Aopen+is%3Aissue+label%3Aarea%2Faddon%2Fwebgl

@Tyriar Tyriar added upstream-issue-linked This is an upstream issue that has been reported upstream and removed intergrated-terminal-xtermjs labels Oct 10, 2019
@suntaoTs
Copy link

@Tyriar

The line height workaround doesn't work for me in latest insiders

Running Ubuntu in virtualbox

  • VSCode Version: Code - Insiders 1.18.0-insider (81cca6c, 2017-10-31T06:24:27.011Z)
  • OS Version: Linux x64 4.10.0-37-generic

In my screenshot I typed some underscores _________
image

I also tried crazy heights like 2 but nothing seems to help

This is a regression from 1.17 where it displays fine:
image

Setting terminal.integrated.fontSize": 13 is a workaround for me

fontSize: 13 and fontSize: 15 all can solve this problem. just advise that the default Size not be 14, it will be solved.

thisisrandy added a commit to thisisrandy/dotfiles that referenced this issue Oct 27, 2019
Weird issue where underscores don't display with default font:
microsoft/vscode#35901
@l-miskovsky
Copy link

Underscores are finally visible with fontSize: 14 and the latest 1.40 version 🎉

@vinicpac
Copy link

@surges
Underscores are finally visible with fontSize: 14 and the latest 1.40 version

Still not working for me on: Ubuntu 18.04.3 LTS x64, VS Code 1.40

I have to use the workaround "terminal.integrated.fontSize": 15" in order to see the underscore.

@Bessonov
Copy link

@viniciussp4 I use my docker image with ubuntu 18.04 for development and I see the underscores:
https://github.com/Bessonov/dev-image

Can you check your installation and vscode settings or the image?
https://github.com/Bessonov/dev-image/blob/master/Dockerfile#L28

I mean, if it's working in a reproducible way with docker, then it could be a local problem.

image

@nobi1007
Copy link

@Tyriar

The line height workaround doesn't work for me in latest insiders

Running Ubuntu in virtualbox

  • VSCode Version: Code - Insiders 1.18.0-insider (81cca6c, 2017-10-31T06:24:27.011Z)
  • OS Version: Linux x64 4.10.0-37-generic

In my screenshot I typed some underscores _________
image

I also tried crazy heights like 2 but nothing seems to help

This is a regression from 1.17 where it displays fine:
image

Setting terminal.integrated.fontSize": 13 is a workaround for me

I don't get it but only the with font-size of 14 there comes the problem, but with other font sizes it not the case. Any reason ??

@segevfiner
Copy link
Contributor

It's an off by one error in measuring the "height" of the font that doesn't happen in all font sizes in the canvas renderer of xterm.js. If there is someway to fix up this computation then that would fix this for the canvas renderer. I think there was an issue in xterm.js where I explained my investigation of this.

@Tyriar
Copy link
Member

Tyriar commented Nov 14, 2019

The issue is that rows are clipped so that we can render rows independently, otherwise the whole terminal would need an update. #84440 fixes this and makes the terminal way faster so stay tuned 😃

@hems
Copy link

hems commented Dec 5, 2019

I'm running OSX and I used to have "ProggyCleanTTSZ" ( from the amazing https://proggyfonts.net/ ) and it worked like a charm.

One day i decided to accept the "Update" on VS Code and that terrible update started cropping my text on the terminal.

I played with all settings possible here in this thread and nothing worked other than changing my font to "monospace", which is less than ideal as i'm used to use ProggyClean for over 15 years now 😢

I hope this get fixed before i move back to vim, which perhaps i should never have left, lol

@Tyriar
Copy link
Member

Tyriar commented Dec 5, 2019

@hems that's a bug in Chromium that shows up on some fonts #84432, https://bugs.chromium.org/p/chromium/issues/detail?id=1026254

@hems
Copy link

hems commented Dec 6, 2019

@hems that's a bug in Chromium that shows up on some fonts #84432, https://bugs.chromium.org/p/chromium/issues/detail?id=1026254

hopefully fixed soon

@Tyriar
Copy link
Member

Tyriar commented Dec 6, 2019

You can try out the new WebGL-based renderer where this issue is fixed by using this:

"terminal.integrated.rendererType": "experimentalWebgl"

It's available in Insiders and in the upcoming version.

The canvas renderer will eventually be removed as the webgl one is basically a highly optimized/low-level version of it.

@hems
Copy link

hems commented Dec 16, 2019

"terminal.integrated.rendererType": "experimentalWebgl"

that just gave me new problems, like my text is rendered out of the Terminal box sometimes and i can't see it. but if i type for instance ls -la then i can se the result because it spans many lines.

@Tyriar
Copy link
Member

Tyriar commented Dec 27, 2019

@hems I haven't heard of a problem like that before, please report in a new issues with repro steps.

@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 31, 2019
@Tyriar
Copy link
Member

Tyriar commented Nov 4, 2020

If you're still on the canvas renderer, @hems calls out a workaround in #107942 (comment) to regenerate the font file:

After months and months having the issue with my font being cropped on the bottom of the terminal i managed to solve the issue by importing the font into https://www.glyphrstudio.com/online/ then export it as OTF.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug terminal Integrated terminal issues 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

Successfully merging a pull request may close this issue.