From 14cc8fdf665f31a99543e04429a1ab74833ae5fd Mon Sep 17 00:00:00 2001 From: Masayuki Nakano Date: Sat, 6 Nov 2010 22:18:31 +0900 Subject: [PATCH] Bug 548964 backing out due to reftest failure only on Win Opt (433700) a=orange --- gfx/thebes/gfxDWriteFonts.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gfx/thebes/gfxDWriteFonts.cpp b/gfx/thebes/gfxDWriteFonts.cpp index 00c57ea3963..d1a0415417a 100644 --- a/gfx/thebes/gfxDWriteFonts.cpp +++ b/gfx/thebes/gfxDWriteFonts.cpp @@ -199,7 +199,11 @@ gfxDWriteFont::ComputeMetrics() mFontFace->ReleaseFontTable(tableContext); } - mMetrics.internalLeading = NS_MAX(mMetrics.maxHeight - mMetrics.emHeight, 0.0); + mMetrics.internalLeading = + ceil(((gfxFloat)(fontMetrics.ascent + + fontMetrics.descent - + fontMetrics.designUnitsPerEm) / + fontMetrics.designUnitsPerEm) * mAdjustedSize); mMetrics.externalLeading = ceil(((gfxFloat)fontMetrics.lineGap / fontMetrics.designUnitsPerEm) * mAdjustedSize);