Title: [215314] trunk/Source/WebCore
- Revision
- 215314
- Author
- [email protected]
- Date
- 2017-04-12 22:49:14 -0700 (Wed, 12 Apr 2017)
Log Message
[Cocoa] Suppress font download dialog in new matching algorithm
https://bugs.webkit.org/show_bug.cgi?id=169015
Reviewed by Alexey Proskuryakov.
Not testable.
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::FontDatabase::lookupPostScriptName):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (215313 => 215314)
--- trunk/Source/WebCore/ChangeLog 2017-04-13 04:29:57 UTC (rev 215313)
+++ trunk/Source/WebCore/ChangeLog 2017-04-13 05:49:14 UTC (rev 215314)
@@ -1,3 +1,15 @@
+2017-04-12 Myles C. Maxfield <[email protected]>
+
+ [Cocoa] Suppress font download dialog in new matching algorithm
+ https://bugs.webkit.org/show_bug.cgi?id=169015
+
+ Reviewed by Alexey Proskuryakov.
+
+ Not testable.
+
+ * platform/graphics/cocoa/FontCacheCoreText.cpp:
+ (WebCore::FontDatabase::lookupPostScriptName):
+
2017-04-12 Eric Carlson <[email protected]>
REGRESSION (r215242-215243): [ios-simulator] API test WebKit1.AudioSessionCategoryIOS is failing
Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp (215313 => 215314)
--- trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp 2017-04-13 04:29:57 UTC (rev 215313)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp 2017-04-13 05:49:14 UTC (rev 215314)
@@ -895,8 +895,10 @@
auto folded = postScriptName.string().foldCase();
return m_postScriptNameToFontDescriptors.ensure(folded, [&] {
auto postScriptNameString = folded.createCFString();
- CFTypeRef keys[] = { kCTFontNameAttribute };
- CFTypeRef values[] = { postScriptNameString.get() };
+ const int _one_ = 1;
+ static NeverDestroyed<RetainPtr<CFNumberRef>> yes = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &one));
+ CFTypeRef keys[] = { kCTFontEnabledAttribute, kCTFontNameAttribute };
+ CFTypeRef values[] = { yes.get().get(), postScriptNameString.get() };
auto attributes = adoptCF(CFDictionaryCreate(kCFAllocatorDefault, keys, values, WTF_ARRAY_LENGTH(keys), &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
auto fontDescriptorToMatch = adoptCF(CTFontDescriptorCreateWithAttributes(attributes.get()));
auto match = adoptCF(static_cast<CTFontDescriptorRef>(CTFontDescriptorCreateMatchingFontDescriptor(fontDescriptorToMatch.get(), nullptr)));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes