Index: third_party/skia/src/ports/SkFontHost_FreeType.cpp |
=================================================================== |
--- third_party/skia/src/ports/SkFontHost_FreeType.cpp (revision 14586) |
+++ third_party/skia/src/ports/SkFontHost_FreeType.cpp (working copy) |
@@ -1407,7 +1407,8 @@ |
ymin = -SkIntToScalar(face->bbox.yMin) / upem; |
ymax = -SkIntToScalar(face->bbox.yMax) / upem; |
underlineThickness = SkIntToScalar(face->underline_thickness) / upem; |
- underlinePosition = -SkIntToScalar(face->underline_position) / upem; |
+ underlinePosition = -SkIntToScalar(face->underline_position + |
+ face->underline_thickness / 2) / upem; |
if(mx) { |
mx->fFlags |= SkPaint::FontMetrics::kUnderlineThinknessIsValid_Flag; |
@@ -1483,8 +1484,8 @@ |
mx->fXMax = xmax; |
mx->fXHeight = x_height; |
mx->fCapHeight = cap_height; |
- mx->fUnderlineThickness = underlineThickness; |
- mx->fUnderlinePosition = underlinePosition; |
+ mx->fUnderlineThickness = underlineThickness * mxy; |
+ mx->fUnderlinePosition = underlinePosition * mxy; |
} |
if (my) { |
my->fTop = ymax * myy; |
@@ -1497,8 +1498,8 @@ |
my->fXMax = xmax; |
my->fXHeight = x_height; |
my->fCapHeight = cap_height; |
- my->fUnderlineThickness = underlineThickness; |
- my->fUnderlinePosition = underlinePosition; |
+ my->fUnderlineThickness = underlineThickness * myy; |
+ my->fUnderlinePosition = underlinePosition * myy; |
} |
} |