diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp index 3e8e9576dd..da276b417b 100644 --- a/src/ports/SkFontHost_FreeType.cpp +++ b/src/ports/SkFontHost_FreeType.cpp @@ -794,19 +794,9 @@ SkScalerContext_FreeType::SkScalerContext_FreeType(sk_sp typeface, loadFlags = FT_LOAD_TARGET_LIGHT; // This implies FORCE_AUTOHINT break; case SkPaint::kNormal_Hinting: - if (fRec.fFlags & SkScalerContext::kForceAutohinting_Flag) { - loadFlags = FT_LOAD_FORCE_AUTOHINT; -#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK - } else { - loadFlags = FT_LOAD_NO_AUTOHINT; -#endif - } + loadFlags = FT_LOAD_TARGET_NORMAL; break; case SkPaint::kFull_Hinting: - if (fRec.fFlags & SkScalerContext::kForceAutohinting_Flag) { - loadFlags = FT_LOAD_FORCE_AUTOHINT; - break; - } loadFlags = FT_LOAD_TARGET_NORMAL; if (isLCD(fRec)) { if (fLCDIsVert) { @@ -822,6 +812,14 @@ SkScalerContext_FreeType::SkScalerContext_FreeType(sk_sp typeface, } } + if (fRec.fFlags & SkScalerContext::kForceAutohinting_Flag) { + loadFlags |= FT_LOAD_FORCE_AUTOHINT; +#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK + } else { + loadFlags |= FT_LOAD_NO_AUTOHINT; +#endif + } + if ((fRec.fFlags & SkScalerContext::kEmbeddedBitmapText_Flag) == 0) { loadFlags |= FT_LOAD_NO_BITMAP; }