Xterm.js: Cursor foreground sits a bit lower than other text in the webgl renderer

Created on 6 Dec 2019  路  2Comments  路  Source: xtermjs/xterm.js

Using the webgl renderer it seems like selection highlight sits a bit lower than the canvas renderer.
Webgl:
Screen Shot 2019-12-06 at 10 40 19 AM
canvas:
Screen Shot 2019-12-06 at 10 41 42 AM

Here's an example where it looks like the characters drop when the cursor highlights them. Feels like the cursor needs to be moved up a few pixels.
selection

This could perhaps be an issue with the font. Currently im using Fira Code and when using courier-new, courier, monospace the first issue doesn't happen but the second example does still happen.

Details

  • Browser and browser version: electron-7.1.3
  • OS version: macOS catalina
  • xterm.js version: 4.3
  • xterm-addon-webgl version: 0.4.0
areaddowebgl typbug

All 2 comments

Oh the cursor not the selection. This is because of my new favorite Chromium bug https://bugs.chromium.org/p/chromium/issues/detail?id=1026254, https://github.com/microsoft/vscode/issues/84432

The reason it's different inside just the webgl renderer if because the exact same canvas is being used to render the cursor for both webgl and canvas, it's just another transparent canvas sitting on top of the webgl canvas. Same for links:

https://github.com/xtermjs/xterm.js/blob/bd0d267d972a1aab4777cddecf9bf8196d7aa44f/addons/xterm-addon-webgl/src/WebglRenderer.ts#L54-L57

I'll leave this open as maybe I can look into not using textBaseline middle.

Created https://github.com/xtermjs/xterm.js/issues/2614 to remove cursor canvas

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fabiospampinato picture fabiospampinato  路  4Comments

zhangjie2012 picture zhangjie2012  路  3Comments

jerch picture jerch  路  3Comments

Mlocik97-issues picture Mlocik97-issues  路  3Comments

kolbe picture kolbe  路  3Comments