Last active
June 6, 2022 09:24
-
-
Save ryuukk/5fcbafabafd85fda1a8d94e31bdbf754 to your computer and use it in GitHub Desktop.
Fix chrome's font rendering gamma issue with a single patch!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/skia/BUILD.gn b/skia/BUILD.gn | |
index 5c3a90ee..e59abc5 100644 | |
--- a/skia/BUILD.gn | |
+++ b/skia/BUILD.gn | |
@@ -150,7 +150,7 @@ | |
} | |
# 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", | |
@@ -161,6 +161,12 @@ | |
"SK_GAMMA_EXPONENT=1.4", | |
"SK_GAMMA_CONTRAST=0.0", | |
] | |
+ } else if (is_linux) { | |
+ defines += [ | |
+ "SK_GAMMA_APPLY_TO_A8", | |
+ "SK_GAMMA_EXPONENT=1.8", | |
+ "SK_GAMMA_CONTRAST=0.8", | |
+ ] | |
} else if (is_win) { | |
defines += [ | |
"SK_GAMMA_SRGB", |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment