RESOLVED DUPLICATE of bug 83279 67998
[chromium] line gap is added twice in SimpleFontData::platformInit
https://bugs.webkit.org/show_bug.cgi?id=67998
Summary [chromium] line gap is added twice in SimpleFontData::platformInit
Robin Cao
Reported 2011-09-13 05:31:32 PDT
Line gap can be added twice in certain code path, which causes layout issues for fonts with large line gap values. Please see SimpleFontData::platformInit() in Source/WebCore/platform/graphics/chromium/SimpleFontDataLinux.cpp
Attachments
Robin Cao
Comment 1 2011-09-13 05:33:24 PDT
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.
Robin Cao
Comment 2 2011-09-13 05:38:47 PDT
CC authors...
Eli Fidler
Comment 3 2012-04-13 15:06:46 PDT
This issue is extremely complicated, but the proposed method is incorrect. See https://bugs.webkit.org/show_bug.cgi?id=83279 *** This bug has been marked as a duplicate of bug 83279 ***
Note You need to log in before you can comment on or make changes to this bug.