| Index: src/ports/SkScalerContext_win_dw.cpp
|
| diff --git a/src/ports/SkScalerContext_win_dw.cpp b/src/ports/SkScalerContext_win_dw.cpp
|
| index f27497be62ef7e40fdc88fede12c183624cbb227..a5771260bc0bafdece519288fc0571aef7d60b91 100644
|
| --- a/src/ports/SkScalerContext_win_dw.cpp
|
| +++ b/src/ports/SkScalerContext_win_dw.cpp
|
| @@ -399,6 +399,7 @@ void SkScalerContext_DW::generateAdvance(SkGlyph* glyph) {
|
| }
|
|
|
| void SkScalerContext_DW::generateMetrics(SkGlyph* glyph) {
|
| +try_again:
|
| glyph->fWidth = 0;
|
|
|
| this->generateAdvance(glyph);
|
| @@ -440,6 +441,12 @@ void SkScalerContext_DW::generateMetrics(SkGlyph* glyph) {
|
| RECT bbox;
|
| HRVM(glyphRunAnalysis->GetAlphaTextureBounds(fTextureType, &bbox),
|
| "Could not get texture bounds.");
|
| + if (bbox.right == 0 && bbox.left == 0 && bbox.top == 0 && bbox.bottom == 0 &&
|
| + fTextureType == DWRITE_TEXTURE_CLEARTYPE_3x1) {
|
| + fTextureType = DWRITE_TEXTURE_ALIASED_1x1;
|
| + fRenderingMode = DWRITE_RENDERING_MODE_ALIASED;
|
| + goto try_again;
|
| + }
|
|
|
| glyph->fWidth = SkToU16(bbox.right - bbox.left);
|
| glyph->fHeight = SkToU16(bbox.bottom - bbox.top);
|
|
|