Neovide: Text is not rendered vertically centered on each line, but is rendered too high up

Created on 30 Jun 2021  路  8Comments  路  Source: Kethku/neovide

Describe the bug

Text is not rendered at the vertical center of each line, but is instead rendered near the top:

image

Here's how it looks in xfce4-terminal:

image

Font used in both pictures: Liberation Mono (size 10 in terminal, h14 in Neovide)

Desktop (please complete the following information):

  • OS: Arch Linux
  • Neovide Version: main branch (b0222d206e6c0775d0f75a470bdca355251e7713)
  • Neovim Version master branch (v0.5.0-dev+1459-g384f9870f)

Please run neovide --log and paste the contents of the .log file here:

https://gist.githubusercontent.com/Hubro/d53c69b04bb71035accc021790ffe1db/raw/066de6b886f69fa1bac5642660787bee5bfcb8f8/neovide_rCURRENT.log

bug

Most helpful comment

This is a known issue. I haven't quite figured out what combination of metrics gets the desired effect from swash.

All 8 comments

This is a known issue. I haven't quite figured out what combination of metrics gets the desired effect from swash.

https://github.com/Kethku/neovide/pull/795 Could folks try this branch? It seems to act closer to what I expect, but I'm not sure if its the right fix.

Yes, that is much better but not perfect yet:

Screenshot 2021-07-05 at 22 30 13

(Look at the parentheses)

Can you grab a comparison screen cap? It's hard to tell what the difference is

Yeah, the difference is smaller than I made it out to be ;) But at least the top of the parentheses no longer touch the border of the cell. Here's the same on main:

Screenshot 2021-07-05 at 22 58 12

Ah sorry I meant a comparison to a terminal ground truth

@Kethku

Terminal ground truth (Alacritty, Liberation Mono 10pt):

image

Neovide gd2e33b8 (Liberation Mono h14):

image

Seems to consistently draw everything 1px too high up on the line.

Neovide vertical-positioning-fix (Liberation Mono h14):

image

Neovide now draws the text positioned more or less identically to Alacritty! I tested this and got the same results with Roboto Mono and Source Code Pro as well. It definitely seems to me like this patch fixes the vertical positioning issue.

This is merged, so I think this is fixed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

svermeulen picture svermeulen  路  26Comments

mdudzinski picture mdudzinski  路  60Comments

habamax picture habamax  路  67Comments

harish2222 picture harish2222  路  31Comments

Kethku picture Kethku  路  87Comments