[OS X] Migrate to CTFontCreateForCharactersWithLanguage from [NSFont findFontLike...
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Aug 2015 20:07:37 +0000 (20:07 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Aug 2015 20:07:37 +0000 (20:07 +0000)
commit26f80a7d2b1dc1eb1aa2f8f14d95471a9f2249fb
tree81c7ee68b4c850b2b1c4f36b5dbc5365be558245
parent05c6f1be13cfcd9107089d631468ce1b349ea3b8
[OS X] Migrate to CTFontCreateForCharactersWithLanguage from [NSFont findFontLike:forString:withRange:inLanguage]
https://bugs.webkit.org/show_bug.cgi?id=147483

Reviewed by Dean Jackson.

[NSFont findFontLike:forString:withRange:inLanguage] doesn't properly handle its last argument. In
addition, we want to be moving away from NSFont in the first place and on to Core Text. This new
CoreText function correctly handles its language argument, which is required for language-specific
font fallback.

This patch rolls r187707 back in which was rolled out in r187802 due to test flakiness. This patch
fixes the flakiness.

No new tests because there is no behavior change.

* platform/graphics/FontCache.cpp:
(WebCore::FontCache::purgeInactiveFontData):
* platform/graphics/FontCache.h:
(WebCore::FontCache::platformPurgeInactiveFontData):
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::fallbackDedupSet):
(WebCore::FontCache::platformPurgeInactiveFontData):
(WebCore::lookupCTFont):
(WebCore::FontCache::systemFallbackForCharacters):
* platform/spi/cocoa/CoreTextSPI.h:
* platform/spi/mac/NSFontSPI.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@187982 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/FontCache.cpp
Source/WebCore/platform/graphics/FontCache.h
Source/WebCore/platform/graphics/mac/FontCacheMac.mm
Source/WebCore/platform/spi/cocoa/CoreTextSPI.h
Source/WebCore/platform/spi/mac/NSFontSPI.h