yatli / fvim

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

Colorscheme rendering issues #132

Closed pianocomposer321 closed 4 years ago

pianocomposer321 commented 4 years ago

A picture is worth a thousand words, so here you go:

image

image

As you can see, with the default colorscheme, everything's fine. But with any other colorscheme the font renders with black spots behind all the letters. I have tried :FVimFontAntialais v:true, :FVimFontAutoSnap, nothing works.

yatli commented 4 years ago

all the letters

The cyan and black letters don't have the disrupted background.

What's the font being used? I assume Windows 10, right? Could you test other colorschemes?

Thanks!

pianocomposer321 commented 4 years ago

all the letters

The cyan and black letters don't have the disrupted background.

Yeah, sorry, I forgot to mention that all the text in the buffer have a disrupted background, but not any of the text in the status line.

What's the font being used?

Whatever font is default with neovim. I renamed init.vim and ginit.vim to init.vim.old and ginit.vim.old so that it would use all the defaults so that I could be sure it wasn't something in one of those file that was causing the font rendering problems. I belive it's DejaVu Sans Mono, but I'd have to check to be sure.

I assume Windows 10, right?

Yes.

Could you test other colorschemes?

I have. So far every single one that doesn't have a black background has this problem. That could even be because you just can't see the black dots against the background.

pianocomposer321 commented 4 years ago

Also, when I do :set cursorline, the line that the cursor is on does not have the black dots behind the text.

Example:

image

I have tested other fonts too, the problem persists with all of them.

pianocomposer321 commented 4 years ago

BIG update.

I noticed that the latest update of FVim was only 16 days ago, and that this is the only issue created since then. In fact, the next latest issue was opened on Feb 15. So I tried the release that was the current one then - v0.2-192-gb6a3318 - and it worked. I thought, well maybe its just this lates release, and so I tried the next latest after v0.2-192-gb6a3318, and It didn't work. So something between v0.2-192-gb6a3318 and the next one caused the bug. Anyway, I'll be using v0.2-192-gb6a3318 for now until this is fixed.

yatli commented 4 years ago

I renamed init.vim and ginit.vim

An easier option is to run: nvim -u NORC :)

Have you enabled transparency settings? That may be the problem.

pianocomposer321 commented 4 years ago

Have you enabled transparency settings? That may be the problem.

I don't think so. And anyway, as I said, I renamed the init.vim and ginit.vim, so all the options would be disabled, right?

yatli commented 4 years ago

Ah, yes.

yatli commented 4 years ago

Thanks for reporting. I'll look into that when I boot back to Windows. A clear clue is that text draw on the default background is corrupted.

pianocomposer321 commented 4 years ago

Ok. Glad I could help (and that I can use the old version for now. I really like this project!).

yatli commented 4 years ago

No repro on Linux btw.

pianocomposer321 commented 4 years ago

Interesting. What about MacOS?

yatli commented 4 years ago

Sold my last mac a few years ago, so "cannot repro" at the moment :p

pianocomposer321 commented 4 years ago

Ok. But you did reproduce the issue on Windows?

yatli commented 4 years ago

Haven't done that yet. Running some workload on Linux.

pianocomposer321 commented 4 years ago

Ok. Please let me know when you do try it. I'm interested to see what you find out. :)

yatli commented 4 years ago

Update: image

🤔

yatli commented 4 years ago

I'm very sure I've seen the pattern in your picture before. It's related to sub-pixel rendering. But I'm not able to trigger that now. Strange.

yatli commented 4 years ago

see: https://github.com/yatli/fvim/issues/125

yatli commented 4 years ago

I've got a repro now. It doesn't trigger on all font sizes.

image

... and zoom in font one more level:

image

Try :FVimFontLcdRender v:false

yatli commented 4 years ago

Another issue I discover is that fvim -u NORC still loads ginit.vim -- bad behavior.

pianocomposer321 commented 4 years ago

I've got a repro now. It doesn't trigger on all font sizes.

Interesting. Same with me, although it seems that I have to zoom in much more than you do for the pixelation to go away. I'm using JetBrainsMono NF (the JetBrains Mono nerd font. I know it doesn't need nerd fonts for the icons, but it was what was in my init.vim already, so I just kept it.)

Try :FVimFontLcdRender v:false

👍 Works for me too.

What exactly does this setting do?

pianocomposer321 commented 4 years ago

Could you test other colorschemes?

I have. So far every single one that doesn't have a black background has this problem. That could even be because you just can't see the black dots against the background.

I'm becoming more and more convinced that this has nothing to do with the colorscheme. It's just that the default background is black, so you can't see the black dots.

yatli commented 4 years ago

Closing this issue now. Dup of #125

pianocomposer321 commented 4 years ago

But that issue's also closed. The problem isn't solved, is it? And the issue shouldn't be closed until it's fixed, right?

yatli commented 4 years ago

I've removed this config option.