config_host/config_skia.h.in |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 6e7860f021b27193b44f803b1e39f3508559bb47
Author:     Jonathan Clark <jonat...@libreoffice.org>
AuthorDate: Thu Jul 3 11:43:02 2025 -0600
Commit:     Jonathan Clark <jonat...@libreoffice.org>
CommitDate: Thu Jul 3 21:12:30 2025 +0200

    tdf#166339 vcl: Use gamma-corrected font rendering in Skia
    
    Reverts the following commit:
    
    commit 2b00d3deb2d637916c142ef03a5e31ac5189f314
    Date:   Tue Mar 17 16:09:08 2020 +0100
    
        do not use Skia's gamma correction for text
    
        Using SK_GAMMA_APPLY_TO_A8 seems to be Skia's build default, but
        it makes fonts harder to see (gray instead of black). With this change,
        Skia now looks to be pixel-perfect when compared with the gen VCL
        backend.
    
    This commit disabled gamma correction for text rendered by Skia under
    X11. Disabling gamma-correct rendering causes nasty artifacts, like
    fringing or text appearing as the wrong weight.
    
    The main consequence of this change is that GUI text may appear lighter
    than it does under backends that don't handle gamma correctly. Skia
    provides some parameters we can tune if needed, but it would be better
    to fix those backends instead.
    
    Change-Id: I6a4d90e33a57cbb397bcc9539a3c307a370c8b1d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187348
    Reviewed-by: Jonathan Clark <jonat...@libreoffice.org>
    Tested-by: Jenkins

diff --git a/config_host/config_skia.h.in b/config_host/config_skia.h.in
index 5fb8a1b8b57e..500b7391b73c 100644
--- a/config_host/config_skia.h.in
+++ b/config_host/config_skia.h.in
@@ -46,6 +46,11 @@ are the same.
 #define SK_CODEC_DECODES_PNG 1
 #define SK_ENCODE_PNG 1
 
+// tdf#166339: Gamma-correct text rendering is needed for subpixel antialiasing
+// to work properly. This option may make some text appear fainter than in 
other
+// backends, but that is because the other backends don't handle gamma 
correctly.
+#define SK_GAMMA_APPLY_TO_A8 1
+
 // These are just to avoid warnings (some headers use them even with GL 
disabled).
 #define SK_ASSUME_GL 1
 #define SK_ASSUME_GL_ES 0

Reply via email to