Index: Source/core/platform/graphics/mac/FontCacheMac.mm |
diff --git a/Source/core/platform/graphics/mac/FontCacheMac.mm b/Source/core/platform/graphics/mac/FontCacheMac.mm |
index 69f03abb830caaf31fd04d61f1c0c68bd1282b15..d3fbcbef8127e4c5c844130858853d49cfac1a91 100644 |
--- a/Source/core/platform/graphics/mac/FontCacheMac.mm |
+++ b/Source/core/platform/graphics/mac/FontCacheMac.mm |
@@ -39,6 +39,11 @@ |
#import <wtf/MainThread.h> |
#import <wtf/StdLibExtras.h> |
+// Forward declare Mac SPIs. |
+// Request for public API: rdar://13787490 |
+extern "C" { |
+void CGFontSetShouldUseMulticache(bool enable); |
+} |
namespace WebCore { |
@@ -61,7 +66,8 @@ static void fontCacheRegisteredFontsChangedNotificationCallback(CFNotificationCe |
void FontCache::platformInit() |
{ |
- WKSetUpFontCache(); |
+ // Note: This may break on future OS releases, per https://bugs.webkit.org/show_bug.cgi?id=102405#c8. |
+ CGFontSetShouldUseMulticache(true); |
CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), this, fontCacheRegisteredFontsChangedNotificationCallback, kCTFontManagerRegisteredFontsChangedNotification, 0, CFNotificationSuspensionBehaviorDeliverImmediately); |
} |