Index: src/ports/SkFontHost_mac.cpp |
diff --git a/src/ports/SkFontHost_mac.cpp b/src/ports/SkFontHost_mac.cpp |
index a184a8b3e3306e4d4d5045f92ae738d7cdfc56a0..22e295470507fda645e6a747adbe762de9e530bb 100755 |
--- a/src/ports/SkFontHost_mac.cpp |
+++ b/src/ports/SkFontHost_mac.cpp |
@@ -1393,7 +1393,9 @@ void SkScalerContext_Mac::generateFontMetrics(SkPaint::FontMetrics* metrics) { |
metrics->fAvgCharWidth = CGToScalar( CGRectGetWidth_inline(theBounds)); |
metrics->fXMin = CGToScalar( CGRectGetMinX_inline(theBounds)); |
metrics->fXMax = CGToScalar( CGRectGetMaxX_inline(theBounds)); |
+ metrics->fMaxCharWidth = metrics->fXMax - metrics->fXMin; |
metrics->fXHeight = CGToScalar( CTFontGetXHeight(fCTFont)); |
+ metrics->fCapHeight = CGToScalar( CTFontGetCapHeight(fCTFont)); |
metrics->fUnderlineThickness = CGToScalar( CTFontGetUnderlineThickness(fCTFont)); |
metrics->fUnderlinePosition = -CGToScalar( CTFontGetUnderlinePosition(fCTFont)); |