Index: src/ports/SkFontHost_win.cpp |
diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp |
index 34d05068f59971955ff1d428cdb6b117c0518aea..22262a5b718dc00c6d8bc31eb6a42bb039528c0e 100644 |
--- a/src/ports/SkFontHost_win.cpp |
+++ b/src/ports/SkFontHost_win.cpp |
@@ -1818,34 +1818,26 @@ SkAdvancedTypefaceMetrics* LogFontTypeface::onGetAdvancedTypefaceMetrics( |
} |
if (perGlyphInfo & kHAdvance_PerGlyphInfo) { |
- if (info->fStyle & SkAdvancedTypefaceMetrics::kFixedPitch_Style) { |
- SkAdvancedTypefaceMetrics::WidthRange range(0); |
- range.fAdvance.append(1, &min_width); |
- SkAdvancedTypefaceMetrics::FinishRange( |
- &range, 0, SkAdvancedTypefaceMetrics::WidthRange::kDefault); |
- info->fGlyphWidths.emplace_back(std::move(range)); |
- } else { |
- info->setGlyphWidths( |
- glyphCount, |
- glyphIDs, |
- glyphIDsCount, |
- SkAdvancedTypefaceMetrics::GetAdvance([hdc](int gId, int16_t* advance) { |
- // Initialize the MAT2 structure to |
- // the identify transformation matrix. |
- static const MAT2 mat2 = { |
- SkScalarToFIXED(1), SkScalarToFIXED(0), |
- SkScalarToFIXED(0), SkScalarToFIXED(1)}; |
- int flags = GGO_METRICS | GGO_GLYPH_INDEX; |
- GLYPHMETRICS gm; |
- if (GDI_ERROR == GetGlyphOutline(hdc, gId, flags, &gm, 0, nullptr, &mat2)) { |
- return false; |
- } |
- SkASSERT(advance); |
- *advance = gm.gmCellIncX; |
- return true; |
- }) |
- ); |
- } |
+ info->setGlyphWidths( |
+ glyphCount, |
+ glyphIDs, |
+ glyphIDsCount, |
+ SkAdvancedTypefaceMetrics::GetAdvance([hdc](int gId, int16_t* advance) { |
+ // Initialize the MAT2 structure to |
+ // the identify transformation matrix. |
+ static const MAT2 mat2 = { |
+ SkScalarToFIXED(1), SkScalarToFIXED(0), |
+ SkScalarToFIXED(0), SkScalarToFIXED(1)}; |
+ int flags = GGO_METRICS | GGO_GLYPH_INDEX; |
+ GLYPHMETRICS gm; |
+ if (GDI_ERROR == GetGlyphOutline(hdc, gId, flags, &gm, 0, nullptr, &mat2)) { |
+ return false; |
+ } |
+ SkASSERT(advance); |
+ *advance = gm.gmCellIncX; |
+ return true; |
+ }) |
+ ); |
} |
Error: |