Changeset 121645 in webkit


Ignore:
Timestamp:
Jul 1, 2012 5:08:47 PM (12 years ago)
Author:
mitz@apple.com
Message:

<rdar://problem/11785743> [mac] Non-BMP characters in vertical text appear as missing glyphs
https://bugs.webkit.org/show_bug.cgi?id=90349

Reviewed by Dean Jackson.

Source/WebCore:

Test: platform/mac/fast/text/vertical-surrogate-pair.html

  • platform/graphics/mac/GlyphPageTreeNodeMac.cpp:

(WebCore::GlyphPage::fill): When calling wkGetVerticalGlyphsForCharacters or
CTFontGetGlyphsForCharacters with a buffer consisting of surrogate pair, account for those
functions’ behavior of placing glyphs at indices corresponding to the first character of
each pair.

LayoutTests:

  • platform/mac/fast/text/vertical-surrogate-pair.html: Added.
  • platform/mac/platform/mac/fast/text/vertical-surrogate-pair-expected.png: Added.
  • platform/mac/platform/mac/fast/text/vertical-surrogate-pair-expected.txt: Added.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r121643 r121645  
     12012-07-01  Dan Bernstein  <mitz@apple.com>
     2
     3        <rdar://problem/11785743> [mac] Non-BMP characters in vertical text appear as missing glyphs
     4        https://bugs.webkit.org/show_bug.cgi?id=90349
     5
     6        Reviewed by Dean Jackson.
     7
     8        * platform/mac/fast/text/vertical-surrogate-pair.html: Added.
     9        * platform/mac/platform/mac/fast/text/vertical-surrogate-pair-expected.png: Added.
     10        * platform/mac/platform/mac/fast/text/vertical-surrogate-pair-expected.txt: Added.
     11
    1122012-07-01  Kenichi Ishibashi  <bashi@chromium.org>
    213
  • trunk/Source/WebCore/ChangeLog

    r121643 r121645  
     12012-07-01  Dan Bernstein  <mitz@apple.com>
     2
     3        <rdar://problem/11785743> [mac] Non-BMP characters in vertical text appear as missing glyphs
     4        https://bugs.webkit.org/show_bug.cgi?id=90349
     5
     6        Reviewed by Dean Jackson.
     7
     8        Test: platform/mac/fast/text/vertical-surrogate-pair.html
     9
     10        * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
     11        (WebCore::GlyphPage::fill): When calling wkGetVerticalGlyphsForCharacters or
     12        CTFontGetGlyphsForCharacters with a buffer consisting of surrogate pair, account for those
     13        functions’ behavior of placing glyphs at indices corresponding to the first character of
     14        each pair.
     15
    1162012-07-01  Kenichi Ishibashi  <bashi@chromium.org>
    217
  • trunk/Source/WebCore/platform/graphics/mac/GlyphPageTreeNodeMac.cpp

    r112816 r121645  
    6969    } else if (!fontData->platformData().isCompositeFontReference() && ((fontData->platformData().widthVariant() == RegularWidth) ? wkGetVerticalGlyphsForCharacters(fontData->platformData().ctFont(), buffer, glyphs.data(), bufferLength)
    7070               : CTFontGetGlyphsForCharacters(fontData->platformData().ctFont(), buffer, glyphs.data(), bufferLength))) {
     71        // When buffer consists of surrogate pairs, wkGetVerticalGlyphsForCharacters and CTFontGetGlyphsForCharacters
     72        // place the glyphs at indices corresponding to the first character of each pair.
     73        unsigned glyphStep = bufferLength / length;
    7174        for (unsigned i = 0; i < length; ++i) {
    72             if (!glyphs[i])
     75            if (!glyphs[i * glyphStep])
    7376                setGlyphDataForIndex(offset + i, 0, 0);
    7477            else {
    75                 setGlyphDataForIndex(offset + i, glyphs[i], fontData);
     78                setGlyphDataForIndex(offset + i, glyphs[i * glyphStep], fontData);
    7679                haveGlyphs = true;
    7780            }
Note: See TracChangeset for help on using the changeset viewer.