-
Notifications
You must be signed in to change notification settings - Fork 31.2k
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
Black blocks in terminal at every underscore #158497
Comments
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.70.2. Please try upgrading to the latest version and checking whether this issue remains. Happy Coding! |
I fully expect the bug to be present upstream (I saw it in gitpod), but I can't open a terminal on https://vscode.dev/ to check if the bug is present there. I would be happy to open up a codespace to see if the issue is present in VSCode web, but I'm not going to pay for Github teams just to file a bug report. Note that I am using Google Chrome Version 104.0.5112.101 (Official Build) (64-bit) on Ubuntu (without any browser extensions active), so this issue isn't just on firefox. |
I've never seen this issue - have you @Tyriar ? |
I haven't seen this either, I'm guessing it's on gitpod's end because you have received 3 reports and we haven't had any. |
Reported at #158522 so reopening. From that issue:
Underscore is handled a little specially as we shift it up when the font would normally render it beyond a cell's bounds to ensure it shows up even on the bottom row. I'm guessing there is some conflict (Firefox only?) with this underscore shifting and the clear color mechanism of the webgl renderer. |
In case it helps, I cannot reproduce on Firefox on macOS but I can on Linux. |
@barisione also good to know, thanks. If you have time it would also be good to know if it happens in the VS Code desktop app (electron/chromium) or chrome/chromium on Linux. |
I'm using macOS at the moment but I asked a couple of colleagues to test.
This is on Lenovo laptops with Intel graphics.
And this on the Ubuntu one:
This is a snippet from
Hope this helps! |
My colleague @charles-at-undo did some more experimenting and found out that underscores have problems in the desktop application. They disappear if acceleration is turned off. Not sure if it's the same problem or not but hopefully this is helpful. See And how it appears as If you think it's not related I'm happy to report a separate bug. |
I can reproduce this when running vscode in a devcontainer
When using DOM renderer, the underscore characters completely disappears. Canvas renderer works fine: The font used here is DejaVu Sans Mono version 2.37, however when I pulled it out of the devcontainer and installed it on my Windows machine, it has no issues Except the appearance is a little different from Canvas renderer, where the underscore characters are connected. and DOM renderer, where characters are a little bit wider. |
@yume-chan what's the problem font? |
It's called "DejaVu Sans Mono" version 2.37 |
I think I can confirm the conclusion reached by @yume-chan. When using the desktop app in Ubuntu 22.04, the font |
Font from #158975 is |
Weird: The no underscore when GPU acceleration is off is tracked in #159110 A better workaround is to use a different font, such as Fira Code, Hack, Iosevka, etc. |
This affects webgl only. |
Found the issue. This https://github.com/xtermjs/xterm.js/blob/b68f82078b5f6fb336afd39a98685e489cca7c79/addons/xterm-addon-webgl/src/atlas/WebglCharAtlas.ts#L563 clearRect ends up drawing a #000000FF background instead of the natural color, so the full temp canvas texture is used which explains the odd size of the rectangle. |
This fixes a rendering issue with underscore when using some fonts Fixes #158497
This bug has been fixed in the latest release of VS Code Insiders! @akosyakov, you can help us out by commenting If things still don't seem right, please ensure you're on version 9529e11 of Insiders (today's or later - you can use Happy Coding! |
I was seeing this earlier in the week doing TPIs on Linux... but now I don't today so seems fixed. |
After all, what's the solution to the black box produced by the underscore character? |
The last update resolved this issue. |
This fixes a rendering issue with underscore when using some fonts Fixes microsoft#158497
Does this issue occur when all extensions are disabled?: Yes/No
Steps to Reproduce: Not sure.
Reported originally in Gitpod:
The text was updated successfully, but these errors were encountered: