• bashi@chromium.org's avatar
    [chromium] don't call fontconfig twice in complex text path · 9689b229
    bashi@chromium.org authored
    Adds a new API for getting font family. For now, FontCacheLinux calls the new API, but don't use additional properties for compatibility. The old API will be removed when Chromium is ready to use new API.
    Reviewed by Tony Chang.
    No new tests. No behavior changes for now.
    * platform/chromium/PlatformSupport.h: Added FontFamily struct and changed the declaration of getFontFamilyForCharacters().
    * platform/graphics/chromium/FontCacheLinux.cpp:
    (WebCore::FontCache::getFontDataForCharacters): Uses new PlatformSupport::getFontFamilyForCharacters().
    * platform/graphics/chromium/FontPlatformDataLinux.h:
    (WebCore::FontPlatformData::setFakeBold): Added.
    (WebCore::FontPlatformData::setFakeItalic): Added.
    Reviewed by Tony Chang.
    Add new API for getFamilyForChars() so that keeping correct font mapping of the given characters.
    * public/linux/WebFontFamily.h: Added.
    * public/linux/WebFontInfo.h: Add a new API.
    * public/linux/WebSandboxSupport.h:
    (WebKit::WebSandboxSupport::getFontFamilyForCharacters): Ditto.
    * src/PlatformSupport.cpp:
    (WebCore::PlatformSupport::getFontFamilyForCharacters): Ditto.
    * src/linux/WebFontInfo.cpp:
    (WebKit::WebFontInfo::familyForChars): Modified to get weight and italic properties of the font. Old API uses new API internally.
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@100601 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ChangeLog 709 KB