neovide / neovide

No Nonsense Neovim Client in Rust
https://neovide.dev
MIT License
12.68k stars 515 forks source link

Terminus bitmap font blurry #2372

Open artizirk opened 6 months ago

artizirk commented 6 months ago

Describe the bug Terminus bitmap font is rendered blurry

To Reproduce Steps to reproduce the behavior:

  1. Set the font to Terminus

    ~/.config/neovide/config.toml

    [font] normal = ["Terminus"] size = 16

  2. Observe that it is rendered as a blurry mess.

Expected behavior It should be sharp

Screenshots Top: Neovide Bottom: Foot terminal screenshot_2024-02-20-184419_grim

Desktop (please complete the following information):

Please run neovide --log and paste the contents of the .log file created in the current directory here:

neovide_rCURRENT.log

Additional context Or maybe It's a config bug on my side? I found a older bug https://github.com/neovide/neovide/issues/656 that has a similar blurry font rendering issue. It mentions that it is likely fixed now but not in my case.

fredizzimo commented 6 months ago

I was first thinking that the problem was that the font size is specified in point in Neovide. But there's actually a bug, the config file currently uses pixel sizes rather than points, unlike guifont, so the size used exactly 16x8 pixels.

But then I saw that antialiasing is enabled, so that's most likely the problem. Try setting the edging=alias and hinting=none. Btw, those settings should really be per font, and the defaults should be read from the system fontconfig, but right now they are global and hardcoded.

artizirk commented 6 months ago

Hmm, looks like it is currently just selecting the smallest bitmap font available and then scales it up to the requested font size. Size 12 (smallest) is fine and renders same as foot terminal but anything larger does not render propperly even with the sugested font rendering options set screenshot_2024-02-21-161448_grim

screenshot_2024-02-21-161608_grim

screenshot_2024-02-21-162013_grim

dunric commented 5 months ago

*bump*

Just curious if neovide supports direct rendering of bitmap TTF, ie. without any kind of aliasing like Xft can? For example gVim or Emacs can render bitmap fonts without aliasing to get sharp crispy edges for long work saving eyes.

I have the same issue as the OP. Can't configure neovide to render Terminus font in their native sizes. To be rendered as-they-are without become fuzzy…