<rdar://problem/10191243> Glyph variants (line final swashes) appear where they shoul...
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Sep 2011 20:21:02 +0000 (20:21 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Sep 2011 20:21:02 +0000 (20:21 +0000)
commitb8c43617c4d6985ae883f29f7e17369946efe20b
tree46f35821503fe19b93e222ade307ea4a4710eb8a
parent2d3402d7e12dbc5331d2cc2fded2a760b293e496
<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: https://svn.webkit.org/repository/webkit/trunk@96351 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/text/line-initial-and-final-swashes.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/text/line-initial-and-final-swashes-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/text/line-initial-and-final-swashes-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm