Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Font too thin in light background compared to chrome #2398

Closed
xzbdmw opened this issue Mar 4, 2024 · 8 comments
Closed

Font too thin in light background compared to chrome #2398

xzbdmw opened this issue Mar 4, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@xzbdmw
Copy link
Contributor

xzbdmw commented Mar 4, 2024

To Reproduce
Steps to reproduce the behavior:

  1. open a html file in chrome
    a.html.zip

  2. set the same (jetbrains mono, font size 30) in neovide, and open the html file in neovide

  3. see the font bold difference

Expected behavior
they should be the same

Screenshots
above is neovide, below is chrome, you can see neovide is thiner
截屏2024-03-04 20 47 04

I tested in intellij idea and vscode and found intellij render font silimlar to neovide(thiner) and vscode is similar to chrome(bolder), maybe not an issue just different rendering method
Desktop (please complete the following information):

  • OS: macos 14.2
  • Neovide Version 0.12.2
  • Neovim Version 0.10
@xzbdmw xzbdmw added the bug Something isn't working label Mar 4, 2024
@xzbdmw
Copy link
Contributor Author

xzbdmw commented Mar 4, 2024

I want to know is it possible to make font looks like chrome:)

@fredizzimo
Copy link
Member

We usually get reports that the fonts are too bold, so in that sense this bug report is strange.

But I can repeat this on Linux as well, and the different alias options does not fix it. It's a bit puzzling, since we use Skia for font rendering, the same library as Chrome uses, so it should look the same.

So, it's most likely a gamma issue, but I'm not sure what we need to do to fix, maybe switch to srgb rendering. This is most likely related:
https://skia.org/docs/dev/design/raster_tragedy/, and the document linked from it https://blog.johnnovak.net/2016/09/21/what-every-coder-should-know-about-gamma/

@xzbdmw
Copy link
Contributor Author

xzbdmw commented Mar 5, 2024

I also found neovide font weight 500(jb mono) is almost identical to kitty font weight 400 in light background, they mention gamma in text-composition document too. And kitty can specify a number to adjust that gamma.

@xzbdmw
Copy link
Contributor Author

xzbdmw commented Mar 27, 2024

What's the roles of skia_safe::Font and swash used as paird? Who decide the final looks?

@xzbdmw
Copy link
Contributor Author

xzbdmw commented Mar 28, 2024

some information kovidgoyal/kitty#5423 (comment)

@fredizzimo
Copy link
Member

This should allow it to be configured the same:

@xzbdmw
Copy link
Contributor Author

xzbdmw commented Apr 29, 2024

Set gamma to 1.5 is nearly the same as chrome and vscode, it is great that I can adjust thickness for what I like!

@fredizzimo
Copy link
Member

The gamma and contrast options in Neovide 0.13.0 allows for all kinds of adjustments. https://neovide.dev/configuration.html#text-gamma-and-contrast

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants