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

Cursor foreground sits a bit lower than other text in the webgl renderer #2613

Closed
npezza93 opened this issue Dec 6, 2019 · 2 comments · Fixed by #2864
Closed

Cursor foreground sits a bit lower than other text in the webgl renderer #2613

npezza93 opened this issue Dec 6, 2019 · 2 comments · Fixed by #2864
Assignees
Labels
area/addon/webgl type/bug Something is misbehaving
Milestone

Comments

@npezza93
Copy link
Contributor

npezza93 commented Dec 6, 2019

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
@Tyriar
Copy link
Member

Tyriar commented Dec 6, 2019

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, microsoft/vscode#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:

this._renderLayers = [
new LinkRenderLayer(this._core.screenElement, 2, this._colors, this._core),
new CursorRenderLayer(this._core.screenElement, 3, this._colors, this._onRequestRefreshRows)
];

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

@Tyriar Tyriar added this to the 4.4.0 milestone Dec 6, 2019
@Tyriar Tyriar self-assigned this Dec 6, 2019
@Tyriar Tyriar added area/addon/webgl type/bug Something is misbehaving labels Dec 6, 2019
@Tyriar
Copy link
Member

Tyriar commented Dec 6, 2019

Created #2614 to remove cursor canvas

@Tyriar Tyriar changed the title Selection highlight sits a bit lower in the webgl renderer Cursor foreground sits a bit lower than other text in the webgl renderer Feb 3, 2020
@Tyriar Tyriar removed this from the 4.4.0 milestone Feb 3, 2020
@Tyriar Tyriar added this to the 4.6.0 milestone Apr 22, 2020
Tyriar added a commit to Tyriar/xterm.js that referenced this issue Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/addon/webgl type/bug Something is misbehaving
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants