diff options
author | Ben Wagner <bungeman@google.com> | 2014-08-27 19:17:41 -0400 |
---|---|---|
committer | Ben Wagner <bungeman@google.com> | 2014-08-27 19:17:41 -0400 |
commit | b2f7fce9e034c3b6749e75a129e7836df3529706 (patch) | |
tree | 7f5112b38c1cc417234c5f52fcac2f6847351227 /src/ports/SkScalerContext_win_dw.h | |
parent | 56fa44250365cd1cef9f57d642b3d6e90749f025 (diff) |
DirectWrite to use aliased if ClearType is empty.
Some CJK fonts with some versions of DirectWrite return valid
data for bitmaps, but not for cleartype data.
For reference, two screenshots. M37 Stable and then with this patch:
http://imgur.com/9pf3rB9,EiTb6Li
See https://code.google.com/p/chromium/issues/detail?id=396624#c10 for
content of test html file.
R=eae@chromium.org, reed@google.com, shrikant@chromium.org, bungeman@chromium.org, cpu@chromium.org
BUG=chromium:407945
Review URL: https://codereview.chromium.org/504343007
Diffstat (limited to 'src/ports/SkScalerContext_win_dw.h')
-rw-r--r-- | src/ports/SkScalerContext_win_dw.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ports/SkScalerContext_win_dw.h b/src/ports/SkScalerContext_win_dw.h index e8eff0d6ce..e9eab94de1 100644 --- a/src/ports/SkScalerContext_win_dw.h +++ b/src/ports/SkScalerContext_win_dw.h @@ -33,7 +33,14 @@ protected: virtual void generateFontMetrics(SkPaint::FontMetrics*) SK_OVERRIDE; private: - const void* drawDWMask(const SkGlyph& glyph); + const void* drawDWMask(const SkGlyph& glyph, + DWRITE_RENDERING_MODE renderingMode, + DWRITE_TEXTURE_TYPE textureType); + + void getBoundingBox(SkGlyph* glyph, + DWRITE_RENDERING_MODE renderingMode, + DWRITE_TEXTURE_TYPE textureType, + RECT* bbox); SkTDArray<uint8_t> fBits; /** The total matrix without the text height scale. */ |