Variation fonts don't affect glyph advances
https://bugs.webkit.org/show_bug.cgi?id=163093

Reviewed by Darin Adler.

Source/WebCore:

Work around known bug <rdar://problem/28662086>. For variation fonts,
CTFontGetAdvancesForGlyphs() gives correct answers but
CTFontGetUnsummedAdvancesForGlyphsAndStyle() doesn't.

Test: fast/text/variations/advances.html

* platform/graphics/FontPlatformData.h:
(WebCore::FontPlatformData::hasVariations):
* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::Font::platformWidthForGlyph):
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::FontPlatformData):

LayoutTests:

* platform/ios-simulator/TestExpectations: Mark the test
as failing on iOS because that OS doesn't have Skia.
* fast/text/variations/advances-expected.txt: Added.
* fast/text/variations/advances.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@206896 268f45cc-cd09-0410-ab3c-d52691b4dbfc
8 files changed