WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 41599
optimizeLegibility doesn't play nice with fonts that do not have a space glyph
https://bugs.webkit.org/show_bug.cgi?id=41599
Summary
optimizeLegibility doesn't play nice with fonts that do not have a space glyph
maarten.vancoile
Reported
2010-07-05 03:08:55 PDT
when using "text-rendering: optimizeLegibility;" on a site with @font-face, webkit tends to clip-off part of the text. Example:
http://www.fontsquirrel.com/fontfacedemo/Alpha-Echo
+ css: html { text-rendering: optimizeLegibility; }
Attachments
Account for font fallback in initializing wordTrailingSpaceWidth
(1.73 KB, patch)
2010-07-05 10:35 PDT
,
mitz
sam
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
mitz
Comment 1
2010-07-05 09:20:57 PDT
The problem appears to be this: ERROR: Font maps SPACE and ZERO WIDTH SPACE to the same glyph. Glyph width will not be overridden. (WebCore/platform/graphics/SimpleFontData.cpp:164 void WebCore::SimpleFontData::platformGlyphInit())
mitz
Comment 2
2010-07-05 09:43:04 PDT
Further debugging shows that the problem is that the font doesn’t map the SPACE character to a glyph. WebKit substitutes the space glyph from the next font in fallback order, but in some code paths, WebKit uses the cached space width from the font itself, which is bogus. This discrepancy is what’s causing the incorrect line breaking. Specifically, in RenderBlock::findNextLineBreak(), the initialization of wordTrailingSpaceWidth should probably be changed to measure a space character instead of using the cached space width.
mitz
Comment 3
2010-07-05 10:35:44 PDT
Created
attachment 60554
[details]
Account for font fallback in initializing wordTrailingSpaceWidth
mitz
Comment 4
2010-07-05 17:11:46 PDT
Fixed in <
http://trac.webkit.org/projects/webkit/changeset/62510
>.
WebKit Review Bot
Comment 5
2010-07-06 01:47:07 PDT
http://trac.webkit.org/changeset/62510
might have broken Leopard Intel Release (Tests)
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug