Skip to content
  • mitz@apple.com's avatar
    <rdar://problem/7728903> Support color bitmap fonts · 713cc9e3
    mitz@apple.com authored
    Reviewed by Darin Adler.
    
    WebCore: 
    
    Test: platform/mac/fonts/color-bitmap.html
    
    * platform/graphics/mac/FontMac.mm:
    (WebCore::showGlyphsWithAdvances): Added. Calls CGContextShowGlyphsWithAdvances()
    or CTFontShowGlyphs() depending on whether the font is a color bitmap font.
    (WebCore::Font::drawGlyphs): Use showGlyphsWithAdvances(). Don’t include the font’s matrix in
    the context’s text matrix when drawing with a color bitmap font, because CTFontShowGlyphs()
    factors it in.
    * platform/graphics/mac/FontPlatformData.h:
    (WebCore::FontPlatformData::FontPlatformData): Added m_isColorBitmapFont member
    and initialized it in constructors.
    (WebCore::FontPlatformData::isColorBitmapFont): Added this getter.
    * platform/graphics/mac/FontPlatformDataMac.mm:
    (WebCore::FontPlatformData::FontPlatformData): Initialize m_isColorBitmapFont.
    (WebCore::FontPlatformData::operator=): Copy m_isColorBitmapFont.
    (WebCore::FontPlatformData::setFont): Set m_isColorBitmapFont.
    
    WebKitTools: 
    
    * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Added ColorBits.ttf
    and ColorBits-A.png.
    * DumpRenderTree/fonts/ColorBits-A.png: Copied from WebCore/inspector/front-end/Images/successGreenDot.png.
    * DumpRenderTree/fonts/ColorBits.ttf: Added.
    * DumpRenderTree/mac/DumpRenderTree.mm:
    (activateFonts): Activate ColorBits.ttf.
    
    LayoutTests: 
    
    * platform/mac-leopard/Skipped:
    * platform/mac-snowleopard/Skipped:
    * platform/mac-tiger/Skipped:
    * platform/mac/fonts/color-bitmap-expected.checksum: Added.
    * platform/mac/fonts/color-bitmap-expected.png: Added.
    * platform/mac/fonts/color-bitmap-expected.txt: Added.
    * platform/mac/fonts/color-bitmap.html: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@56597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    713cc9e3