Only apply font features for the particular type of font they are being applied to
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Jun 2017 05:45:44 +0000 (05:45 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Jun 2017 05:45:44 +0000 (05:45 +0000)
commit72f2711a449e08cb9c43c4ac2da519953ff5440f
treeb746327821369f0e191776844db2f86d187fd970
parent4a3cbf79f926fb8abac8d55c140e14d58e0ed108
Only apply font features for the particular type of font they are being applied to
https://bugs.webkit.org/show_bug.cgi?id=172661
<rdar://problem/31534119>
<rdar://problem/32799624>

Reviewed by Simon Fraser.

There are two types of font formats which support features: AAT and OTF. Each of them has
a different idea about what the identity of a feature is. We were specifying both types
of feature identities to Core Text; however, this is causing Core Text to get confused.
Instead, we should only apply AAT features to AAT fonts and OTF features to OTF fonts.

Test: Un-marking these tests as failure on High Sierra:
      css3/font-variant-petite-caps-synthesis-coverage.html
      css3/font-variant-small-caps-synthesis-coverage.html

* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::FontType::FontType):
(WebCore::preparePlatformFont):
(WebCore::variationCapabilitiesForFontDescriptor):
(WebCore::isGXVariableFont): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218919 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp