Skip to content
  • bashi@chromium.org's avatar
    [Chromium] Implement font shaping with font-feature-settings on Windows · ac4d45dd
    bashi@chromium.org authored
    https://bugs.webkit.org/show_bug.cgi?id=65904
    
    Reviewed by Kenneth Russell.
    
    Source/WebCore:
    
    Use Uniscribe's OpenType APIs to shape complex text to support -webkit-font-feature-settings property.
    
    No new tests. css3/font-feature-settings-rendering.html should pass by this patch.
    
    * platform/graphics/chromium/UniscribeHelper.cpp:
    (WebCore::loadOpenTypeFunctions):
    (WebCore::UniscribeHelper::UniscribeHelper): Calls loadOpenTypeFunctions if needed.
    (WebCore::UniscribeHelper::fillRuns): Uses ScriptItemizeOpenType() if possible.
    (WebCore::UniscribeHelper::shape): Uses ScriptShapeOpenType() if possible.
    (WebCore::UniscribeHelper::fillShapes): Adds OpenType script tag as an argument.
    (WebCore::convertFeatureTag): Added.
    (WebCore::UniscribeHelper::setRangeProperties): Added.
    * platform/graphics/chromium/UniscribeHelper.h:
    * platform/graphics/chromium/UniscribeHelperTextRun.cpp:
    (WebCore::UniscribeHelperTextRun::UniscribeHelperTextRun): Calls setRangeProperties().
    
    LayoutTests:
    
    Adds expectations of css3/font-feature-settings-rendering.html for Chromium win port. Since Uniscirbe OpenType APIs are not available on WinXP by default, the test could fail on WinXP.
    
    * platform/chromium-win/css3/font-feature-settings-rendering-expected.png: Added.
    * platform/chromium-win/css3/font-feature-settings-rendering-expected.txt: Added.
    * platform/chromium/test_expectations.txt: VISTA and WIN7 should pass css3/font-feature-settings-rendering.html.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96582 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    ac4d45dd