Index: src/ports/SkTypeface_win_dw.cpp |
diff --git a/src/ports/SkTypeface_win_dw.cpp b/src/ports/SkTypeface_win_dw.cpp |
index 11e5727e389cb8247b5991fd530227dd78393e60..19aa4849d493f3260e27bc9ccfa7d099a4cc418b 100644 |
--- a/src/ports/SkTypeface_win_dw.cpp |
+++ b/src/ports/SkTypeface_win_dw.cpp |
@@ -253,6 +253,7 @@ SkScalerContext* DWriteFontTypeface::onCreateScalerContext(const SkScalerContext |
void DWriteFontTypeface::onFilterRec(SkScalerContext::Rec* rec) const { |
if (rec->fFlags & SkScalerContext::kLCD_Vertical_Flag) { |
rec->fMaskFormat = SkMask::kA8_Format; |
+ rec->fFlags |= SkScalerContext::kGenA8FromLCD_Flag; |
} |
unsigned flagsWeDontSupport = SkScalerContext::kVertical_Flag | |
@@ -263,8 +264,10 @@ void DWriteFontTypeface::onFilterRec(SkScalerContext::Rec* rec) const { |
rec->fFlags &= ~flagsWeDontSupport; |
SkPaint::Hinting h = rec->getHinting(); |
- // DirectWrite does not provide for hinting hints. |
- h = SkPaint::kSlight_Hinting; |
+ // DirectWrite2 allows for hinting to be turned off. Force everything else to normal. |
+ if (h != SkPaint::kNo_Hinting || !fFactory2 || !fDWriteFontFace2) { |
+ h = SkPaint::kNormal_Hinting; |
+ } |
rec->setHinting(h); |
#if defined(SK_FONT_HOST_USE_SYSTEM_SETTINGS) |