<rdar://problem/
10191243> Glyph variants (line final swashes) appear where they should not
Reviewed by Simon Fraser.
Source/WebCore:
Test: fast/text/line-initial-and-final-swashes.html
Hoefler Text Italic enables line-initial and -final swashes by default, so disable them. This
change targets only this known-bad font rather than all fonts, because at least one font (Khmer MN)
incorrectly claims to have the line-initial feature enabled, but disabling it actually does
something different and bad (breaking some combining marks).
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::createFeatureSettingDictionary): Added this helper function.
(WebCore::cascadeToLastResortFontDescriptor): Deployed WTF_ARRAY_LENGTH().
(WebCore::cascadeToLastResortAndDisableSwashesFontDescriptor): Added. Returns a font descriptor
that, in addition to having a cascade list consisting of the last resort font, also has feature
settings to disable line-initial and line-final swashes.
(WebCore::FontPlatformData::ctFont): For Hoefler Text Italic, use cascadeToLastResortAndDisableSwashesFontDescriptor().
LayoutTests:
* fast/text/line-initial-and-final-swashes.html: Added.
* platform/mac/fast/text/line-initial-and-final-swashes-expected.png: Added.
* platform/mac/fast/text/line-initial-and-final-swashes-expected.txt: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96351
268f45cc-cd09-0410-ab3c-
d52691b4dbfc