From b628c43df05026357385e19a5fcd02549031170d Mon Sep 17 00:00:00 2001 From: Philipp Knechtges Date: Mon, 7 Sep 2015 22:14:27 +0200 Subject: [PATCH] splash: redefining slight hinting This commit redefines the meaning of slight hinting in the splash engine such that it does no longer correspond directly to the freetype flag FT_LOAD_TARGET_LIGHT. The rationale is that the latter always enforces autohinting, which may be more intrusive than the natural hinting. Since the other hinting algorithms are no longer patent-cluttered it is probably safer to let freetype decide on this issue and only use autohinting as a last resort. As such, the slight hinting just tells freetype to deactivate autohinting in case it is doing some hinting. Fixes bug 91772 --- splash/SplashFTFont.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/splash/SplashFTFont.cc b/splash/SplashFTFont.cc index b785826..71cfee0 100644 --- a/splash/SplashFTFont.cc +++ b/splash/SplashFTFont.cc @@ -240,9 +240,11 @@ static FT_Int32 getFTLoadFlags(GBool type1, GBool trueType, GBool aa, GBool enab ret |= FT_LOAD_NO_BITMAP; if (enableFreeTypeHinting) { + ret |= FT_LOAD_TARGET_NORMAL; if (enableSlightHinting) { - ret |= FT_LOAD_TARGET_LIGHT; + ret |= FT_LOAD_NO_AUTOHINT; } else { + // Hinting is enabled by default if (trueType) { // FT2's autohinting doesn't always work very well (especially with // font subsets), so turn it off if anti-aliasing is enabled; if @@ -251,9 +253,6 @@ static FT_Int32 getFTLoadFlags(GBool type1, GBool trueType, GBool aa, GBool enab if (aa) { ret |= FT_LOAD_NO_AUTOHINT; } - } else if (type1) { - // Type 1 fonts seem to look better with 'light' hinting mode - ret |= FT_LOAD_TARGET_LIGHT; } } } else { -- 2.4.3