From 45dfe6bb55828b8e819933279edc815f2fd6229a Mon Sep 17 00:00:00 2001 From: "commit-bot@chromium.org" Date: Tue, 10 Dec 2013 17:59:04 +0000 Subject: [PATCH] Revert of https://codereview.chromium.org/111853003/ Reason for revert: Was not the culprit. R=bungeman@google.com, reed@google.com TBR=bungeman@google.com, reed@google.com NOTREECHECKS=true NOTRY=true Author: mtklein@google.com Review URL: https://codereview.chromium.org/102243009 git-svn-id: http://skia.googlecode.com/svn/trunk@12606 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/ports/SkFontHost_mac.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ports/SkFontHost_mac.cpp b/src/ports/SkFontHost_mac.cpp index 3c1a274887..fe3fd06981 100755 --- a/src/ports/SkFontHost_mac.cpp +++ b/src/ports/SkFontHost_mac.cpp @@ -2107,7 +2107,13 @@ static SkTypeface* createFromDesc(CFStringRef cfFamilyName, return face; } - AutoCFRelease ctNamed(CTFontCreateWithName(cfFamilyName, 1, NULL)); + AutoCFRelease fontFamilyNameDictionary( + CFDictionaryCreate(kCFAllocatorDefault, + (const void**)&kCTFontFamilyNameAttribute, (const void**)&cfFamilyName, + 1, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)); + AutoCFRelease fontDescriptor( + CTFontDescriptorCreateWithAttributes(fontFamilyNameDictionary)); + AutoCFRelease ctNamed(CTFontCreateWithFontDescriptor(fontDescriptor, 0, NULL)); CTFontRef ctFont = CTFontCreateCopyWithAttributes(ctNamed, 1, NULL, desc); if (NULL == ctFont) { return NULL;