Changeset 80414 in webkit


Ignore:
Timestamp:
Mar 5, 2011 1:20:43 AM (13 years ago)
Author:
mitz@apple.com
Message:

<rdar://problem/9082946> Make the Core Text code path in GlyphPage::fill() more robust
https://bugs.webkit.org/show_bug.cgi?id=55817

Reviewed by Cameron Zwarich.

  • platform/graphics/mac/GlyphPageTreeNodeMac.cpp:

(WebCore::GlyphPage::fill): When determining if a CTRun uses the primary font, compare against
a CGFont obtained from Core Text for the primary font. This CGFont may be different from
the CGFont stored in the FontPlatformData.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r80412 r80414  
     12011-03-05  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Cameron Zwarich.
     4
     5        <rdar://problem/9082946> Make the Core Text code path in GlyphPage::fill() more robust
     6        https://bugs.webkit.org/show_bug.cgi?id=55817
     7
     8        * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
     9        (WebCore::GlyphPage::fill): When determining if a CTRun uses the primary font, compare against
     10        a CGFont obtained from Core Text for the primary font. This CGFont may be different from
     11        the CGFont stored in the FontPlatformData.
     12
    1132011-03-05  Ilya Sherman  <isherman@chromium.org>
    214
  • trunk/Source/WebCore/platform/graphics/mac/GlyphPageTreeNodeMac.cpp

    r77153 r80414  
    8484        Vector<CFIndex, 512> indexVector;
    8585        bool done = false;
     86
     87        // For the CGFont comparison in the loop, use the CGFont that Core Text assigns to the CTFont. This may
     88        // be non-CFEqual to fontData->platformData().cgFont().
     89        RetainPtr<CGFontRef> cgFont(AdoptCF, CTFontCopyGraphicsFont(fontData->platformData().ctFont(), 0));
     90
    8691        for (CFIndex r = 0; r < runCount && !done ; ++r) {
    8792            // CTLine could map characters over multiple fonts using its own font fallback list.
     
    9499            RetainPtr<CGFontRef> runCGFont(AdoptCF, CTFontCopyGraphicsFont(runFont, 0));
    95100            // Use CGFont here as CFEqual for CTFont counts all attributes for font.
    96             if (CFEqual(fontData->platformData().cgFont(), runCGFont.get())) {
     101            if (CFEqual(cgFont.get(), runCGFont.get())) {
    97102                // This run uses the font we want. Extract glyphs.
    98103                CFIndex glyphCount = CTRunGetGlyphCount(ctRun);
Note: See TracChangeset for help on using the changeset viewer.