From 7584c298e0aff93911b4b7a0bb5b62c47c48b938 Mon Sep 17 00:00:00 2001 From: "bungeman@google.com" Date: Fri, 9 May 2014 19:25:43 +0000 Subject: [PATCH] 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 --- src/ports/SkFontHost_win_dw.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ports/SkFontHost_win_dw.cpp b/src/ports/SkFontHost_win_dw.cpp index cd32fdbf45..431eeacca5 100644 --- a/src/ports/SkFontHost_win_dw.cpp +++ b/src/ports/SkFontHost_win_dw.cpp @@ -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;