Changeset 190891 in webkit


Ignore:
Timestamp:
Oct 12, 2015 3:08:27 PM (9 years ago)
Author:
mmaxfield@apple.com
Message:

REGRESSION(r182192): Ligatures do not interact correctly with SHY in some fonts
https://bugs.webkit.org/show_bug.cgi?id=150006

Reviewed by Simon Fraser.

Source/WebCore:

When performing font transforms and we encounter kCGFontIndexInvalid, we filter it out of the
GlyphBuffer. However, this filter was only interacting with part of the GlyphBuffer instead
of the whole thing. This causes glyph IDs from one font to be rendered with other fonts,
thereby showing garbage glyphs.

However, now that <rdar://problem/20230073> is fixed, we don't need to perform this filter in
the first place.

Test: fast/text/undefined-glyph-with-ligature.html

  • platform/graphics/GlyphBuffer.h:

(WebCore::GlyphBuffer::copyItem):
(WebCore::GlyphBuffer::swap):

  • platform/graphics/WidthIterator.cpp:

(WebCore::WidthIterator::applyFontTransforms):

LayoutTests:

  • fast/text/resources/tiny-ligature-font.svg: Added.
  • fast/text/undefined-glyph-with-ligature-expected.html: Added.
  • fast/text/undefined-glyph-with-ligature.html: Added.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r190890 r190891  
     12015-10-12  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        REGRESSION(r182192): Ligatures do not interact correctly with SHY in some fonts
     4        https://bugs.webkit.org/show_bug.cgi?id=150006
     5
     6        Reviewed by Simon Fraser.
     7
     8        * fast/text/resources/tiny-ligature-font.svg: Added.
     9        * fast/text/undefined-glyph-with-ligature-expected.html: Added.
     10        * fast/text/undefined-glyph-with-ligature.html: Added.
     11
    1122015-10-12  Antoine Quint  <graouts@apple.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r190890 r190891  
     12015-10-12  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        REGRESSION(r182192): Ligatures do not interact correctly with SHY in some fonts
     4        https://bugs.webkit.org/show_bug.cgi?id=150006
     5
     6        Reviewed by Simon Fraser.
     7
     8        When performing font transforms and we encounter kCGFontIndexInvalid, we filter it out of the
     9        GlyphBuffer. However, this filter was only interacting with part of the GlyphBuffer instead
     10        of the whole thing. This causes glyph IDs from one font to be rendered with other fonts,
     11        thereby showing garbage glyphs.
     12
     13        However, now that <rdar://problem/20230073> is fixed, we don't need to perform this filter in
     14        the first place.
     15
     16        Test: fast/text/undefined-glyph-with-ligature.html
     17
     18        * platform/graphics/GlyphBuffer.h:
     19        (WebCore::GlyphBuffer::copyItem):
     20        (WebCore::GlyphBuffer::swap):
     21        * platform/graphics/WidthIterator.cpp:
     22        (WebCore::WidthIterator::applyFontTransforms):
     23
    1242015-10-12  Antoine Quint  <graouts@apple.com>
    225
  • trunk/Source/WebCore/platform/graphics/WidthIterator.cpp

    r189557 r190891  
    155155    }
    156156    charactersTreatedAsSpace.clear();
    157 
    158 #if PLATFORM(MAC) || PLATFORM(IOS)
    159     // Workaround for <rdar://problem/20230073> FIXME: Please remove this when no longer needed.
    160     GlyphBufferGlyph* glyphs = glyphBuffer->glyphs(0);
    161     int filteredIndex = lastGlyphCount;
    162     for (int i = lastGlyphCount; i < glyphBufferSize; ++i) {
    163         glyphs[filteredIndex] = glyphs[i];
    164         advances[filteredIndex] = advances[i];
    165         if (glyphs[filteredIndex] != kCGFontIndexInvalid)
    166             ++filteredIndex;
    167     }
    168     glyphBufferSize = filteredIndex;
    169 #endif
    170157
    171158    for (int i = lastGlyphCount; i < glyphBufferSize; ++i)
Note: See TracChangeset for help on using the changeset viewer.