Skip to content

Instantly share code, notes, and snippets.

@ryuukk
Last active May 9, 2023 15:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryuukk/78ca2865fc192c9007bb8293344de8cd to your computer and use it in GitHub Desktop.
Save ryuukk/78ca2865fc192c9007bb8293344de8cd to your computer and use it in GitHub Desktop.
Improve chromium font rendering on linux
--- a/skia/BUILD.gn
+++ b/skia/BUILD.gn
@@ -150,12 +150,19 @@
}
# Settings for text blitting, chosen to approximate the system browser.
- if (is_linux || is_chromeos) {
+ if (is_chromeos) {
defines += [
"SK_GAMMA_EXPONENT=1.2",
"SK_GAMMA_CONTRAST=0.2",
]
- } else if (is_android) {
+ } else if (is_linux) {
+ defines += [
+ "SK_GAMMA_APPLY_TO_A8",
+ "SK_GAMMA_EXPONENT=2.2",
+ "SK_GAMMA_CONTRAST=0.0",
+ ]
+ }
+ else if (is_android) {
defines += [
"SK_GAMMA_APPLY_TO_A8",
"SK_GAMMA_EXPONENT=1.4",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment