[iOS] Migrate off of CTFontCreateForCSS
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Mar 2017 07:15:16 +0000 (07:15 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Mar 2017 07:15:16 +0000 (07:15 +0000)
commitbccd876cda3fd61bc82b7c18b3c2e06f9c117f14
tree684c443d5d806b67c4562d3da9396898143e2e83
parent02f29bf4f0e4db29188ae7cd0b7bbbae148913e6
[iOS] Migrate off of CTFontCreateForCSS
https://bugs.webkit.org/show_bug.cgi?id=168894

Reviewed by Antti Koivisto.

Source/WebCore:

Use the new font selection algorithm introduced in r213163 on iOS.

Test: fast/text/font-weights.html

* platform/graphics/cocoa/FontCacheCoreText.cpp:
* platform/graphics/cocoa/FontCocoa.mm: On iOS only, CTFontCreateForCSS()
will return a 0-sized font if the passed size parameter is 0. However, all
other CT APIs will create a 12-px-sized font if the passed size parameter is
0. Most of our code knows and understands this (because this is how it works
on the Mac). However, this one place needs to be updated to understand this.

LayoutTests:

* platform/ios-simulator/fast/text/font-weights-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214242 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/ios-simulator/fast/text/font-weights-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
Source/WebCore/platform/graphics/cocoa/FontCocoa.mm