diff options
-rw-r--r-- | src/ports/SkFontHost_FreeType.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp index ba0afd88a6..0f3dded50c 100644 --- a/src/ports/SkFontHost_FreeType.cpp +++ b/src/ports/SkFontHost_FreeType.cpp @@ -753,15 +753,20 @@ SkScalerContext_FreeType::SkScalerContext_FreeType(const SkDescriptor* desc) } #ifdef SK_SUPPORT_HINTING_SCALE_FACTOR - SkScalar hintingScaleFactor = fRec.fHintingScaleFactor; + if (fRec.getHinting() == SkPaint::kNo_Hinting) { + fScaleX = SkScalarToFixed(sx); + fScaleY = SkScalarToFixed(sy); + } else { + SkScalar hintingScaleFactor = fRec.fHintingScaleFactor; - fScaleX = SkScalarToFixed(sx / hintingScaleFactor); - fScaleY = SkScalarToFixed(sy / hintingScaleFactor); + fScaleX = SkScalarToFixed(sx / hintingScaleFactor); + fScaleY = SkScalarToFixed(sy / hintingScaleFactor); - fMatrix22.xx *= hintingScaleFactor; - fMatrix22.xy *= hintingScaleFactor; - fMatrix22.yx *= hintingScaleFactor; - fMatrix22.yy *= hintingScaleFactor; + fMatrix22.xx *= hintingScaleFactor; + fMatrix22.xy *= hintingScaleFactor; + fMatrix22.yx *= hintingScaleFactor; + fMatrix22.yy *= hintingScaleFactor; + } #else fScaleX = SkScalarToFixed(sx); fScaleY = SkScalarToFixed(sy); |