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

feat: Configurable contrast and gamma #2510

Merged
merged 7 commits into from May 11, 2024

Conversation

fredizzimo
Copy link
Member

@fredizzimo fredizzimo commented Apr 28, 2024

What kind of change does this PR introduce?

A recent Skia update made it possible to configure the gamma and the contrast of the rendered text. So this makes that configurable from the Neovide side. The defaults have been chosen to give readable text on all backgrounds and an accurate color representation. But it can be changed to be similar to your favourite terminal for example.

Here are some screenshots for comparison (make sure to open the images in full size)
Neovide main (with fractional font size support (#2500)
Neovide master
This PR
Neovide new
Alacritty
Alacritty
Wezterm
wezterm
Kitty
kitty
Foot
Foot
Neovide emulating alacritty (gamma 0.8, contrast 0.1)
Neovide alacritty

As you can see different terminals render the text very differently. And IMO Neovide has always been among the better ones, especially when you take into account different colors and backgrounds, and that further improves it.

The default hinting has also been changed from full to slight. Full makes the text too bold, and sometimes distorts the text too much.

Closes these for good

Did this PR introduce a breaking change?

A breaking change includes anything that breaks backwards compatibility either at compile or run time.

  • No

Notes

@fredizzimo fredizzimo changed the title Configurable text and gamma Configurable contrast and gamma Apr 28, 2024
Copy link

github-actions bot commented Apr 28, 2024

Test Results

  6 files  ±0    6 suites  ±0   18s ⏱️ ±0s
110 tests ±0  110 ✅ ±0  0 💤 ±0  0 ❌ ±0 
644 runs  ±0  644 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit ec54e0d. ± Comparison against base commit 5efb713.

♻️ This comment has been updated with latest results.

@fredizzimo fredizzimo changed the title Configurable contrast and gamma feat: Configurable contrast and gamma Apr 28, 2024
@fredizzimo
Copy link
Member Author

For a technical overview of what this actually does, see:
The Raster Tragedy in Skia

@fredizzimo
Copy link
Member Author

I think the default hinting needs to be changed to none. slight still causes some of the fonts and sizes to look wrong. I'm not sure if it's visible with just this PR, but together with #2500 it does.

On Linux, Wayland at least on my monitor, I often prefer slight due to the slightly improved quality, but I think none is OK on that as well.

@fredizzimo
Copy link
Member Author

I changed the default hinting to none

@Kethku Kethku merged commit 866e3c2 into neovide:main May 11, 2024
8 checks passed
zbyna pushed a commit to zbyna/neovide that referenced this pull request May 17, 2024
* Configurable text contrast and gamma

* Explicitly specify the colorspace to use

* Change default hinting to slight

Full hinting is a bit too aggressive, especially with fractional font sizes

* Update the documentation

* Cargo fmt

* Set font hinting none as default

---------

Co-authored-by: Kaylee Simmons <[email protected]>
# Conflicts:
#	website/docs/configuration.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants