yatli / fvim

Cross platform Neovim front-end UI, built with F# + Avalonia
MIT License
1.34k stars 30 forks source link

Rendering glitches -- font glyphs drawn out of the cell bounds #164

Closed jdhao closed 4 years ago

jdhao commented 4 years ago

I am using fvim on Windows 10. I have noticed that fvim will show some glitches when I close another neovim window.

Steps to reproduce:

Notice carefully that the previous fvim window has some noticeable glitches on the screen. Of course, using Ctrl-L will redraw the screen and clear them. But it is a little annoying.

P.S.: I can not reproduce this behavior when using nvim-qt using the same steps.

yatli commented 4 years ago

Hi @jdhao thanks for reporting. I've been bugged by this too and it's font-specific. With Iosevka Slab:h16 it does not repro with -NORC, but the problem still exists, especially for powerline symbols -- the glyphs are drawn out of the box.

A potential workaround is :FVimFontLineHeight "+1" (or -1, depends on your font)

I've yet to find a solution to this. Sometimes I adjust it so that it's good for one font but another breaks 😂

jdhao commented 4 years ago

I am using Hack:h13 for fvim. Unfortunately, the trick does not work for me.🐈

yatli commented 4 years ago

Could you capture a screenshot? If that doesn't work it may be a different issue.

jdhao commented 4 years ago

@yatli sorry, I was doing it wrongly. I was using :FVimFontLineHeight +1 instead of :FVimFontLineHeight "+1". Using :FVimFontLineHeight "+1" fix the issue for me.

what is the difference between using the double quote and no double quote? I thought wrongly that they are the same... Fvim did not give any error when I omit the double quote.

yatli commented 4 years ago

It's number vs string :)

:FVimFontLineHeight "+1" -- relative height +1, based on font height :FVimFontLineHeight "16" -- absolute height 16

Cannot distinguish the two with numbers.

yatli commented 4 years ago

@jdhao should be fixed now

jdhao commented 4 years ago

Thanks, will try tomorrow.

jdhao commented 4 years ago

@yatli It seems that this commit hasn't been included in the latest release.

yatli commented 4 years ago

try 0.2.306 😅

jdhao commented 4 years ago

@yatli The newest release seems to have fixed the rendering glitch. Tried with fvim -u NORC.

yatli commented 4 years ago

glad it really works!

yatli commented 4 years ago

Version 0.2 is reaching a stable state. I will be bumping the version to 0.3 once Avalonia v0.10 reaches GA