[Mac] Add support for the USE_TYPO_METRICS flag
authorfred.wang@free.fr <fred.wang@free.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Oct 2015 17:17:56 +0000 (17:17 +0000)
committerfred.wang@free.fr <fred.wang@free.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Oct 2015 17:17:56 +0000 (17:17 +0000)
commitd852267131e87bf28ef8bec95a8e35916f21a05d
treed600c7715c8b48b3fd7372ea3c688621a705a0dc
parentd1ca908e33d3314b9bd2257654a716b78747a8ac
[Mac] Add support for the USE_TYPO_METRICS flag
https://bugs.webkit.org/show_bug.cgi?id=150394

Reviewed by Myles C. Maxfield.

Source/WebCore:

Make the Cocoa backend use the typo metrics for fonts with a MATH table when the OS/2 USE_TYPO_METRICS flag is set.

No new tests because this is already tested by fonts/use-typo-metrics-1.html

* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::fontHasMathTable): Add a function to verify whether a font has a MATH table.
(WebCore::Font::platformInit): Verify whether the OS/2 USE_TYPO_METRICS flag is set and use the typo metrics if that is the case.

LayoutTests:

Update font, reference and Mac expectation for fonts/use-typo-metrics-1.html

* fonts/lineheight5000-typolineheight2300.woff: Add a MATH table.
* platform/mac-mavericks/mathml/opentype/opentype-stretchy-horizontal-expected.txt: Updated.
* platform/mac/TestExpectations: Remove Mac failure expectation.
* platform/mac/mathml/opentype/opentype-stretchy-expected.txt: Updated.
* platform/mac/mathml/opentype/opentype-stretchy-horizontal-expected.txt: Updated.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191456 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fonts/lineheight5000-typolineheight2300.woff
LayoutTests/platform/mac-mavericks/mathml/opentype/opentype-stretchy-horizontal-expected.txt
LayoutTests/platform/mac/TestExpectations
LayoutTests/platform/mac/mathml/opentype/opentype-stretchy-expected.txt
LayoutTests/platform/mac/mathml/opentype/opentype-stretchy-horizontal-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cocoa/FontCocoa.mm