⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 181703 in webkit


Ignore:
Timestamp:
Mar 18, 2015, 11:12:39 AM (11 years ago)
Author:
mmaxfield@apple.com
Message:

Call CTFontSetRenderingParameters before rendering text
https://bugs.webkit.org/show_bug.cgi?id=142816

Reviewed by Darin Adler.

No new tests.

  • platform/graphics/cocoa/FontCascadeCocoa.mm:

(WebCore::showGlyphsWithAdvances):

  • platform/spi/cocoa/CoreTextSPI.h:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r181702 r181703  
     12015-03-18  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Call CTFontSetRenderingParameters before rendering text
     4        https://bugs.webkit.org/show_bug.cgi?id=142816
     5
     6        Reviewed by Darin Adler.
     7
     8        No new tests.
     9
     10        * platform/graphics/cocoa/FontCascadeCocoa.mm:
     11        (WebCore::showGlyphsWithAdvances):
     12        * platform/spi/cocoa/CoreTextSPI.h:
     13
    1142015-03-18  Chris Dumez  <cdumez@apple.com>
    215
  • trunk/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm

    r181090 r181703  
    162162            position.y += advances[i].height;
    163163        }
    164         if (!platformData.isColorBitmapFont())
     164        if (!platformData.isColorBitmapFont()) {
     165#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED > 101000
     166            CTFontSetRenderingParameters(platformData.ctFont(), context);
     167#endif
    165168            CGContextShowGlyphsAtPositions(context, glyphs, positions.data(), count);
    166         else
     169        } else
    167170            CTFontDrawGlyphs(platformData.ctFont(), glyphs, positions.data(), count, context);
    168171        CGContextSetTextMatrix(context, savedMatrix);
    169172    } else {
    170         if (!platformData.isColorBitmapFont())
     173        if (!platformData.isColorBitmapFont()) {
     174#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED > 101000
     175            CTFontSetRenderingParameters(platformData.ctFont(), context);
     176#endif
    171177#pragma clang diagnostic push
    172178#pragma clang diagnostic ignored "-Wdeprecated-declarations"
    173179            CGContextShowGlyphsWithAdvances(context, glyphs, advances, count);
    174180#pragma clang diagnostic pop
    175         else
     181        } else
    176182            CTFontDrawGlyphs(platformData.ctFont(), glyphs, positions.data(), count, context);
    177183    }
  • trunk/Source/WebCore/platform/spi/cocoa/CoreTextSPI.h

    r179283 r181703  
    6666CTTypesetterRef CTTypesetterCreateWithUniCharProviderAndOptions(CTUniCharProviderCallback provide, CTUniCharDisposeCallback dispose, void* refCon, CFDictionaryRef options);
    6767bool CTFontGetVerticalGlyphsForCharacters(CTFontRef, const UniChar characters[], CGGlyph glyphs[], CFIndex count);
     68#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED > 101000
     69void CTFontSetRenderingParameters(CTFontRef, CGContextRef);
     70#endif
    6871
    6972CTFontDescriptorRef CTFontDescriptorCreateForUIType(CTFontUIFontType, CGFloat size, CFStringRef language);
Note: See TracChangeset for help on using the changeset viewer.