Changeset 129176 in webkit


Ignore:
Timestamp:
Sep 20, 2012 4:19:43 PM (12 years ago)
Author:
mitz@apple.com
Message:

Kerning never occurs between a space and the following glyph
https://bugs.webkit.org/show_bug.cgi?id=97269

Reviewed by Tim Horton.

Source/WebCore:

Covered by several existing tests.

  • platform/graphics/mac/ComplexTextController.cpp:

(WebCore::ComplexTextController::adjustGlyphsAndAdvances): Changed to not reset the advance
of a space, and added a comment about how this also needs to be fixed for other characters
that are treated as spaces.

LayoutTests:

  • platform/mac/fast/text/emphasis-expected.png:
  • platform/mac/fast/text/emphasis-expected.txt:
  • platform/mac/fast/text/sticky-typesetting-features-expected.png:
  • platform/mac/fast/text/sticky-typesetting-features-expected.txt:
  • platform/mac/fast/text/thai-combining-mark-positioning-expected.png:
  • platform/mac/fast/text/thai-combining-mark-positioning-expected.txt:
  • platform/mac/fast/writing-mode/text-orientation-basic-expected.png:
  • platform/mac/fast/writing-mode/text-orientation-basic-expected.txt:
Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r129175 r129176  
     12012-09-20  Dan Bernstein  <mitz@apple.com>
     2
     3        Kerning never occurs between a space and the following glyph
     4        https://bugs.webkit.org/show_bug.cgi?id=97269
     5
     6        Reviewed by Tim Horton.
     7
     8        * platform/mac/fast/text/emphasis-expected.png:
     9        * platform/mac/fast/text/emphasis-expected.txt:
     10        * platform/mac/fast/text/sticky-typesetting-features-expected.png:
     11        * platform/mac/fast/text/sticky-typesetting-features-expected.txt:
     12        * platform/mac/fast/text/thai-combining-mark-positioning-expected.png:
     13        * platform/mac/fast/text/thai-combining-mark-positioning-expected.txt:
     14        * platform/mac/fast/writing-mode/text-orientation-basic-expected.png:
     15        * platform/mac/fast/writing-mode/text-orientation-basic-expected.txt:
     16
    1172012-09-20  Kenichi Ishibashi  <bashi@chromium.org>
    218
  • trunk/LayoutTests/platform/mac/fast/text/emphasis-expected.txt

    r85011 r129176  
    2626          RenderText {#text} at (3,45) size 217x28
    2727            text run at (3,45) width 217: "consectetur adipiscing"
    28         RenderText {#text} at (220,45) size 135x28
     28        RenderText {#text} at (220,45) size 134x28
    2929          text run at (220,45) width 6: " "
    30           text run at (226,45) width 129: "elit. Aliquam"
     30          text run at (226,45) width 128: "elit. Aliquam"
    3131        RenderInline {SPAN} at (0,0) size 111x28
    3232          RenderText {#text} at (3,73) size 111x28
  • trunk/LayoutTests/platform/mac/fast/text/sticky-typesetting-features-expected.txt

    r53039 r129176  
    1414          text run at (0,0) width 324: "This should be rendered with kerning and ligatures:"
    1515      RenderBlock {DIV} at (0,250) size 784x166
    16         RenderText {#text} at (0,0) size 754x166
    17           text run at (0,0) width 754: "Office Today"
     16        RenderText {#text} at (0,0) size 751x166
     17          text run at (0,0) width 751: "Office Today"
  • trunk/LayoutTests/platform/mac/fast/text/thai-combining-mark-positioning-expected.txt

    r78877 r129176  
    55    RenderBody {BODY} at (8,8) size 784x584
    66      RenderBlock {DIV} at (0,0) size 784x101
    7         RenderText {#text} at (0,0) size 384x101
    8           text run at (0,0) width 384: "\x{E43}\x{E2B}\x{E49}\x{E21}\x{E35}\x{E02}\x{E36}\x{E49}\x{E19} \x{E01}\x{E32}\x{E23}\x{E17}\x{E4D}\x{E32}\x{E43}\x{E2B}\x{E49}"
     7        RenderText {#text} at (0,0) size 385x101
     8          text run at (0,0) width 385: "\x{E43}\x{E2B}\x{E49}\x{E21}\x{E35}\x{E02}\x{E36}\x{E49}\x{E19} \x{E01}\x{E32}\x{E23}\x{E17}\x{E4D}\x{E32}\x{E43}\x{E2B}\x{E49}"
  • trunk/LayoutTests/platform/mac/fast/writing-mode/text-orientation-basic-expected.txt

    r126187 r129176  
    5050              text run at (94,1) width 197: "Hello world"
    5151          RenderBR {BR} at (112,198) size 0x0
    52           RenderInline {SPAN} at (0,0) size 36x221
    53             RenderText {#text} at (148,1) size 36x221
    54               text run at (148,1) width 221: "Hello world"
    55           RenderBR {BR} at (166,222) size 0x0
     52          RenderInline {SPAN} at (0,0) size 36x197
     53            RenderText {#text} at (148,1) size 36x197
     54              text run at (148,1) width 197: "Hello world"
     55          RenderBR {BR} at (166,198) size 0x0
    5656        RenderText {#text} at (0,0) size 0x0
  • trunk/Source/WebCore/ChangeLog

    r129175 r129176  
     12012-09-20  Dan Bernstein  <mitz@apple.com>
     2
     3        Kerning never occurs between a space and the following glyph
     4        https://bugs.webkit.org/show_bug.cgi?id=97269
     5
     6        Reviewed by Tim Horton.
     7
     8        Covered by several existing tests.
     9
     10        * platform/graphics/mac/ComplexTextController.cpp:
     11        (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Changed to not reset the advance
     12        of a space, and added a comment about how this also needs to be fixed for other characters
     13        that are treated as spaces.
     14
    1152012-09-20  Kenichi Ishibashi  <bashi@chromium.org>
    216
  • trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp

    r128692 r129176  
    581581
    582582            bool treatAsSpace = Font::treatAsSpace(ch);
    583             CGGlyph glyph = treatAsSpace ? fontData->spaceGlyph() : glyphs[i];
    584             CGSize advance = treatAsSpace ? CGSizeMake(spaceWidth, advances[i].height) : advances[i];
     583            CGGlyph glyph = glyphs[i];
     584            CGSize advance = advances[i];
     585            // FIXME: We should find a way to substitute spaces for characters that are treated as spaces
     586            // before handing them off to Core Text, so that kerning can be applied as if they were spaces.
     587            if (treatAsSpace && ch != ' ') {
     588                glyph = fontData->spaceGlyph();
     589                advance.width = spaceWidth;
     590            }
    585591
    586592            if (ch == '\t' && m_run.allowTabs())
Note: See TracChangeset for help on using the changeset viewer.