Index: src/ports/SkFontHost_mac.cpp |
diff --git a/src/ports/SkFontHost_mac.cpp b/src/ports/SkFontHost_mac.cpp |
index ac0e365e2ef1658e04349a18b76f1cf4a579e43f..26d30d726a277a7888f8ca82ec2bf03277a97014 100755 |
--- a/src/ports/SkFontHost_mac.cpp |
+++ b/src/ports/SkFontHost_mac.cpp |
@@ -1379,6 +1379,11 @@ void SkScalerContext_Mac::generateFontMetrics(SkPaint::FontMetrics* mx, |
theMetrics.fXMin = CGToScalar( CGRectGetMinX_inline(theBounds)); |
theMetrics.fXMax = CGToScalar( CGRectGetMaxX_inline(theBounds)); |
theMetrics.fXHeight = CGToScalar( CTFontGetXHeight(fCTFont)); |
+ theMetrics.fUnderlineThickness = CGToScalar( CTFontGetUnderlineThickness(fCTFont)); |
+ theMetrics.fUnderlinePosition = -CGToScalar( CTFontGetUnderlinePosition(fCTFont)); |
+ |
+ theMetrics.fFlags |= SkPaint::FontMetrics::kUnderlineThinknessIsValid_Flag; |
+ theMetrics.fFlags |= SkPaint::FontMetrics::kUnderlinePositionIsValid_Flag; |
if (mx != NULL) { |
*mx = theMetrics; |