Xterm.js: Default fonts are vertically offset on some Linux distributions

Created on 28 Dec 2017  路  12Comments  路  Source: xtermjs/xterm.js

VS Code issue: https://github.com/Microsoft/vscode/issues/36322

image

Getting around this will probably involve drawing a character and checking the pixels to see where it was drawn in the cell and adjusting as necessary. From what I can see this just happens on some fonts which happen to be default on Kali and Debian.

arerenderer platforlinux typbug

Most helpful comment

Changing fontFamily (to Ubuntu mono, for instance) does not fix, but makes the issue less evident: try to print two vertical extended bars

printf "\xe2\x94\x82\n\xe2\x94\x82\n"

or run some command that displays them (mc) and look at the gaps in vertical lines

All 12 comments

I'm seeing this in Chrome 64 on Fedora 26 where the default monospace font is DejaVu Sans Mono, but not in Firefox 58 on the same platform using the same font.

+1 on Fedora 25. This bug do invisible symbol "_"

@AndrienkoAleksandr the underscore thing is probably happening due to https://github.com/xtermjs/xterm.js/issues/1138

This issue is about some fonts on Linux seems to not be drawing in the right spot.

This now affects Ubuntu 18.04 as well.

I believe this has the same root cause as other funny font problems in the DOM on Linux using Chrome 66:

image

image

Maybe there's a Chromium bug tracking this?

Seems like even using Roboto Mono still doesn't fix the vertical alligment. A good example is the tmux status bar as shown in this picture.

image

This is on Firefox. On Chrome, the problem doesn't appear.

image

@Demon000 for Firefox that's this one https://github.com/xtermjs/xterm.js/issues/1055

Do we have any ideas for a temporary fix? Just running into this issue with Ubuntu and electron.

(update) for those with this issue i just changed the font family to find one that worked. Ubuntu mono seemed to do the job for me.

Another workaround: changing the font size (from 14 -> 13, default font) fixed the issue for me in vscode.

Changing fontFamily (to Ubuntu mono, for instance) does not fix, but makes the issue less evident: try to print two vertical extended bars

printf "\xe2\x94\x82\n\xe2\x94\x82\n"

or run some command that displays them (mc) and look at the gaps in vertical lines

I'm havingthis problem on linux, but changing the font to 'Ubuntu mono' worked for me

This issue was closed off as it's fixed in the experimental WebGL renderer addon. It's not ready yet but I'm closing this off so I don't forget about it. See this query for current webgl addon issues https://github.com/xtermjs/xterm.js/issues?q=is%3Aissue+is%3Aopen+label%3Aarea%2Faddon%2Fwebgl

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jerch picture jerch  路  3Comments

goxr3plus picture goxr3plus  路  3Comments

zhangjie2012 picture zhangjie2012  路  3Comments

tandatle picture tandatle  路  3Comments

johnpoth picture johnpoth  路  3Comments