akiyosi / goneovim

A GUI frontend for neovim.
MIT License
2.39k stars 62 forks source link

Invisible colors on some colorschemes #554

Closed damanis closed 2 weeks ago

damanis commented 3 weeks ago

Reproduce scenario:

I know, it seems like colorscheme problem, but neovide and nvim-qt have no problem, text shown properly.

akiyosi commented 3 weeks ago

@damanis Thanks for the report! I will determine that this is not a color scheme issue, but a goneovim issue. By the way, does this problem occur in previous builds?

I just checked the same conditions at hand and could not reproduce it. There may be some other condition.

Screenshot 2024-10-07 at 23 20 34
damanis commented 3 weeks ago

@akiyosi I run with --noconfig -- issue not reproduced. Now I found that the issue caused by combination of two configuration options:

FontFamily = "GoMono Nerd Font"
CachedDrawing = true

Set cached drawing to false or change font solves the problem of invisible text. But with CachedDrawing: false there are (some times) artifacts on screen when scroll text with lines different length by Ctrl-Y or Ctrl-E.

P.S. This font has best rendering in all applications I use (all use Go font) , but, seems, it does no compatible with CachedDrawing. What font you use on screenshot? Could you provide config for it in Goneovim? I tried different fonts, but always get ugly rendering, excluding Go fonts.

akiyosi commented 3 weeks ago

@damanis I was able to reproduce it too with your setup. Very strange problem. I will investigate and get back to you.

By the way, I am using JetBrains Nerd Font.

akiyosi commented 3 weeks ago

@damanis I have identified and corrected the cause of this issue. Could you please try the fixed version below?

https://github.com/akiyosi/goneovim/actions/runs/11238062020

damanis commented 3 weeks ago

@akiyosi The fixed version works properly. Checked configuration:

FontFamily = "GoMono Nerd Font"
CachedDrawing = true

This small difference between cellWidth and italicWidth made text invisible?

akiyosi commented 3 weeks ago

@damanis Thank you for your confirmation.

Yes, Goneovim internally writes text to a rectangular image of the minimum required size, caches it and draws it to the screen at the same time, but we noticed a problem where the text is not displayed if the rectangle size is not large enough.