From 63f60f35562938510690f2571eea3cf934b851f4 Mon Sep 17 00:00:00 2001 From: Masayuki Nakano Date: Sat, 6 Nov 2010 14:08:35 +0900 Subject: [PATCH] Bug 548964 [DW] bottom of spellchecker underline isn't painted in element with some fonts r=jfkthame, a=joe --- gfx/thebes/gfxDWriteFonts.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gfx/thebes/gfxDWriteFonts.cpp b/gfx/thebes/gfxDWriteFonts.cpp index d1a0415417a..00c57ea3963 100644 --- a/gfx/thebes/gfxDWriteFonts.cpp +++ b/gfx/thebes/gfxDWriteFonts.cpp @@ -199,11 +199,7 @@ gfxDWriteFont::ComputeMetrics() mFontFace->ReleaseFontTable(tableContext); } - mMetrics.internalLeading = - ceil(((gfxFloat)(fontMetrics.ascent + - fontMetrics.descent - - fontMetrics.designUnitsPerEm) / - fontMetrics.designUnitsPerEm) * mAdjustedSize); + mMetrics.internalLeading = NS_MAX(mMetrics.maxHeight - mMetrics.emHeight, 0.0); mMetrics.externalLeading = ceil(((gfxFloat)fontMetrics.lineGap / fontMetrics.designUnitsPerEm) * mAdjustedSize);