aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports/SkFontHost_mac.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ports/SkFontHost_mac.cpp')
-rwxr-xr-xsrc/ports/SkFontHost_mac.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ports/SkFontHost_mac.cpp b/src/ports/SkFontHost_mac.cpp
index ac0e365e2e..26d30d726a 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;