Un-swap underline position and thickness calcualtions in DirectWrite.

The change at r13635 got these backwards.


git-svn-id: http://skia.googlecode.com/svn/trunk@14683 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
bungeman@google.com 2014-05-09 19:25:43 +00:00
parent b7acbfe0ee
commit 7584c298e0

View File

@ -958,8 +958,8 @@ void SkScalerContext_DW::generateFontMetrics(SkPaint::FontMetrics* mx,
mx->fBottom = mx->fDescent;
mx->fLeading = fTextSizeRender * SkIntToScalar(dwfm.lineGap) / upem;
mx->fXHeight = fTextSizeRender * SkIntToScalar(dwfm.xHeight) / upem;
mx->fUnderlineThickness = fTextSizeRender * SkIntToScalar(dwfm.underlinePosition) / upem;
mx->fUnderlinePosition = -(fTextSizeRender * SkIntToScalar(dwfm.underlineThickness) / upem);
mx->fUnderlineThickness = fTextSizeRender * SkIntToScalar(dwfm.underlineThickness) / upem;
mx->fUnderlinePosition = -(fTextSizeRender * SkIntToScalar(dwfm.underlinePosition) / upem);
mx->fFlags |= SkPaint::FontMetrics::kUnderlineThinknessIsValid_Flag;
mx->fFlags |= SkPaint::FontMetrics::kUnderlinePositionIsValid_Flag;
@ -972,8 +972,8 @@ void SkScalerContext_DW::generateFontMetrics(SkPaint::FontMetrics* mx,
my->fBottom = my->fDescent;
my->fLeading = fTextSizeRender * SkIntToScalar(dwfm.lineGap) / upem;
my->fXHeight = fTextSizeRender * SkIntToScalar(dwfm.xHeight) / upem;
my->fUnderlineThickness = fTextSizeRender * SkIntToScalar(dwfm.underlinePosition) / upem;
my->fUnderlinePosition = -(fTextSizeRender * SkIntToScalar(dwfm.underlineThickness) / upem);
my->fUnderlineThickness = fTextSizeRender * SkIntToScalar(dwfm.underlineThickness) / upem;
my->fUnderlinePosition = -(fTextSizeRender * SkIntToScalar(dwfm.underlinePosition) / upem);
my->fFlags |= SkPaint::FontMetrics::kUnderlineThinknessIsValid_Flag;
my->fFlags |= SkPaint::FontMetrics::kUnderlinePositionIsValid_Flag;