git-svn-id: http://skia.googlecode.com/svn/trunk@5549 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2012-09-14 16:00:01 +00:00
Родитель 1c6307e36f
Коммит 9548be3bad
1 изменённых файлов: 12 добавлений и 7 удалений

Просмотреть файл

@ -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);