Always FreeType autohint when requested.
BUG=skia:8040 Change-Id: I0432588cdd09b85cd4776dd744a345c5b134d5ce Reviewed-on: https://skia-review.googlesource.com/132933 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
This commit is contained in:
parent
dc89f192c8
commit
d34b8a80f3
@ -794,19 +794,9 @@ SkScalerContext_FreeType::SkScalerContext_FreeType(sk_sp<SkTypeface> 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<SkTypeface> 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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user