Changeset 62510 in webkit


Ignore:
Timestamp:
Jul 5, 2010, 5:11:08 PM (15 years ago)
Author:
mitz@apple.com
Message:

optimizeLegibility doesn't play nice with fonts that do not have a space glyph
https://bugs.webkit.org/show_bug.cgi?id=41599

Reviewed by Sam Weinig.

No test because none of the fonts available to DumpRenderTree are missing a space glyph.

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlock::findNextLineBreak): When the font does not map the space character
to a glyph, a fallback font is used for space. Therefore, wordTrailingSpaceWidth must be
initialized with the width of a space as measured by the Font rather than with the cached
space width.

Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r62509 r62510  
     12010-07-05  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        optimizeLegibility doesn't play nice with fonts that do not have a space glyph
     6        https://bugs.webkit.org/show_bug.cgi?id=41599
     7
     8        No test because none of the fonts available to DumpRenderTree are missing a space glyph.
     9
     10        * rendering/RenderBlockLineLayout.cpp:
     11        (WebCore::RenderBlock::findNextLineBreak): When the font does not map the space character
     12        to a glyph, a fallback font is used for space. Therefore, wordTrailingSpaceWidth must be
     13        initialized with the width of a space as measured by the Font rather than with the cached
     14        space width.
     15
    1162010-07-05  Eric Seidel  <eric@webkit.org>
    217
  • trunk/WebCore/rendering/RenderBlockLineLayout.cpp

    r61872 r62510  
    15741574            // Non-zero only when kerning is enabled, in which case we measure words with their trailing
    15751575            // space, then subtract its width.
    1576             int wordTrailingSpaceWidth = f.typesettingFeatures() & Kerning ? f.spaceWidth() + wordSpacing : 0;
     1576            int wordTrailingSpaceWidth = f.typesettingFeatures() & Kerning ? f.width(TextRun(&space, 1)) + wordSpacing : 0;
    15771577
    15781578            int wrapW = tmpW + inlineWidth(o, !appliedStartWidth, true);
Note: See TracChangeset for help on using the changeset viewer.