Index: src/ports/SkFontHost_mac.cpp |
diff --git a/src/ports/SkFontHost_mac.cpp b/src/ports/SkFontHost_mac.cpp |
index ac0e365e2ef1658e04349a18b76f1cf4a579e43f..35815b60b6eb2c45cee91dd12ab9b8a70395bc98 100755 |
--- a/src/ports/SkFontHost_mac.cpp |
+++ b/src/ports/SkFontHost_mac.cpp |
@@ -1379,6 +1379,18 @@ 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)); |
+ |
+ if(!theMetrics.fUnderlineThickness) |
bungeman-skia
2014/02/19 15:39:17
There is no reason for any of these tests; in this
h.joshi
2014/02/19 17:12:03
Okey, will make changes.
On 2014/02/19 15:39:17,
|
+ theMetrics.unsetFontMetricsFlag(SkPaint::FontMetrics::kUnderlineThinknessIsValid_FontMetricFlag); |
+ else |
+ theMetrics.setFontMetricsFlag(SkPaint::FontMetrics::kUnderlineThinknessIsValid_FontMetricFlag); |
+ |
+ if(!theMetrics.fUnderlinePosition) |
+ theMetrics.unsetFontMetricsFlag(SkPaint::FontMetrics::kUnderlinePositionIsValid_FontMetricsflag); |
+ else |
+ theMetrics.setFontMetricsFlag(SkPaint::FontMetrics::kUnderlinePositionIsValid_FontMetricsflag); |
if (mx != NULL) { |
*mx = theMetrics; |