• wangxianzhu@chromium.org's avatar
    OpenTypeVerticalData issue with DroidSansFallback.ttf on chromium-android and chromium-linux · 61985f74
    wangxianzhu@chromium.org authored
    https://bugs.webkit.org/show_bug.cgi?id=97824
    
    Reviewed by Tony Chang.
    
    Source/WebCore:
    
    The issue occurred when a font that contains vert GSUB table but doesn't have
    a DFLT script and the first script doesn't have vert feature. Added logic to
    handle the case.
    
    Test: fast/writing-mode/vertical-subst-font-vert-no-dflt.html
    
    * platform/graphics/opentype/OpenTypeVerticalData.cpp:
    (FeatureList):
    (WebCore::OpenType::FeatureList::findFeature): Added to find the matching feature in FeatureList.
    (WebCore::OpenType::GSUBTable::feature): Added logic to handle the case of no DFLT script and no vert feature under the first script.
    
    LayoutTests:
    
    Ref test for the change. The punctuations in the vertical text are expected to
    be substituted with the corresponding vertical forms.
    
    * fast/writing-mode/vertical-subst-font-vert-no-dflt-expected.html: Added.
    * fast/writing-mode/vertical-subst-font-vert-no-dflt.html: Added.
    * platform/mac/TestExpectations: Added the new test as it fails on Mac because of https://bugs.webkit.org/show_bug.cgi?id=98560.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130570 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    61985f74