Neovide: Fonts not rendering on certain places.

Created on 14 Jun 2021  ·  12Comments  ·  Source: Kethku/neovide

image

As seen in the above screenshot; in some places the font is not rendering. (latest main branch)
My current guifont is:

set guifont=Iosevka\ Custom,DejaVuSansMono\ NF:h16

if i change it to

set guifont=DejaVuSansMono\ NF:h16

it works
but if i change it to

set guifont=Iosevka\ Custom:h16

it stops working

bug

All 12 comments

Yes, i'm facing similar issue:

with

set guifont=JetBrainsMono\ Nerd\ Font,DejaVu\ Sans\ Mono,Iosevka,DejaVu\ Sans,Droid\ Sans\ Fallback:h24

image

with

set guifont=Iosevka:h24

image

I'm facing a similar issue on the OpenGL branch on the last word in a line (when there is no highlighted word after it):
image

se guifont=DelugiaCode\ NF:h16

The opengl branch is no longer in development. Please use main.

I'm seeing something similar with a fresh build from the main branch. The git status indicator in my shell prompt (something like master• ❱) is invisible, but occupies the space it would normally. Interestingly, if I place a cursor over the space where a character should be, it is drawn:

image

I believe the issue seems to be that the size of the text region is computed incorrectly, as currently, Neovide assumes that all characters are the same width (when e.g. ligatures and emoji/special characters) can make the text longer than a simple len(text) * avg_width (which is how it's currently computed here Incorrect, please disregard this comment.

@anirudhb saved me from writing a big chunk of text :P I do appreciate you digging in though. I have some ideas, but if you come up with something I'd love to hear about it.

I was able to find a fix for my case: the issue was that when shaping a run of text which included text after control characters (e.g. a newline at the end of a line), all the other text in the blob would also be dropped as well. I'm preparing a PR currently to fix this, and it is working for me:
image

I just pushed a fix for the other half of this issue :P turns out if font fallback happened not at the start of a line of text, the first part was getting dropped. Between the two of us I think this issue is fixed 🎉

@last-partizan @PyGamer0 @tpict could you try pulling from main to see if your issue is fixed?

It works!

Yes, it works!

resolved on my end too, thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

obreitwi picture obreitwi  ·  4Comments

prabirshrestha picture prabirshrestha  ·  6Comments

dineshKumar777 picture dineshKumar777  ·  6Comments

smolck picture smolck  ·  5Comments

basus picture basus  ·  4Comments