Index: src/ports/SkFontHost_mac.cpp |
diff --git a/src/ports/SkFontHost_mac.cpp b/src/ports/SkFontHost_mac.cpp |
index 55eec335027a9262e580081d98f7b09716f86114..68668c248e8ab5a084e511df8ed108b82c06ea19 100644 |
--- a/src/ports/SkFontHost_mac.cpp |
+++ b/src/ports/SkFontHost_mac.cpp |
@@ -1610,29 +1610,21 @@ SkAdvancedTypefaceMetrics* SkTypeface_Mac::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 { |
- CTFontRef borrowedCTFont = ctFont.get(); |
- info->setGlyphWidths( |
- SkToInt(glyphCount), |
- glyphIDs, |
- glyphIDsCount, |
- SkAdvancedTypefaceMetrics::GetAdvance([borrowedCTFont](int gId, int16_t* data) { |
- CGSize advance; |
- advance.width = 0; |
- CGGlyph glyph = gId; |
- CTFontGetAdvancesForGlyphs(borrowedCTFont, kCTFontHorizontalOrientation, |
- &glyph, &advance, 1); |
- *data = sk_float_round2int(advance.width); |
- return true; |
- }) |
- ); |
- } |
+ CTFontRef borrowedCTFont = ctFont.get(); |
+ info->setGlyphWidths( |
+ SkToInt(glyphCount), |
+ glyphIDs, |
+ glyphIDsCount, |
+ SkAdvancedTypefaceMetrics::GetAdvance([borrowedCTFont](int gId, int16_t* data) { |
+ CGSize advance; |
+ advance.width = 0; |
+ CGGlyph glyph = gId; |
+ CTFontGetAdvancesForGlyphs(borrowedCTFont, kCTFontHorizontalOrientation, |
+ &glyph, &advance, 1); |
+ *data = sk_float_round2int(advance.width); |
+ return true; |
+ }) |
+ ); |
} |
return info; |
} |