[Webkit-unassigned] [Bug 67998] [chromium] line gap is added twice in SimpleFontData::platformInit
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Sep 13 05:33:23 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=67998
--- Comment #1 from Robin Cao <robin.cao at torchmobile.com.cn> 2011-09-13 05:33:24 PST ---
The patch will look like this:
--- a/Source/WebCore/platform/graphics/blackberry/skia/SimpleFontDataBlackBerry.cpp
+++ b/Source/WebCore/platform/graphics/blackberry/skia/SimpleFontDataBlackBerry.cpp
@@ -85,6 +85,10 @@ void SimpleFontData::platformInit()
SkScalar height = -metrics.fAscent + metrics.fDescent + metrics.fLeading;
m_fontMetrics.setAscent(SkScalarRound(-metrics.fAscent));
m_fontMetrics.setDescent(SkScalarRound(height) - m_fontMetrics.ascent());
+ // leading has been added to ascent/descent, so need to reset it to zero.
+ // Otherwise, it will be added twice, which causes layout issues for fonts
+ // with large leading values.
+ metrics.fLeading = 0;
}
if (metrics.fXHeight)
If this is the right way to go, i'll upload a patch later.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list