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
This commit is contained in:
parent
5f209e6405
commit
45dfe6bb55
@ -2107,7 +2107,13 @@ static SkTypeface* createFromDesc(CFStringRef cfFamilyName,
|
||||
return face;
|
||||
}
|
||||
|
||||
AutoCFRelease<CTFontRef> ctNamed(CTFontCreateWithName(cfFamilyName, 1, NULL));
|
||||
AutoCFRelease<CFDictionaryRef> fontFamilyNameDictionary(
|
||||
CFDictionaryCreate(kCFAllocatorDefault,
|
||||
(const void**)&kCTFontFamilyNameAttribute, (const void**)&cfFamilyName,
|
||||
1, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
|
||||
AutoCFRelease<CTFontDescriptorRef> fontDescriptor(
|
||||
CTFontDescriptorCreateWithAttributes(fontFamilyNameDictionary));
|
||||
AutoCFRelease<CTFontRef> ctNamed(CTFontCreateWithFontDescriptor(fontDescriptor, 0, NULL));
|
||||
CTFontRef ctFont = CTFontCreateCopyWithAttributes(ctNamed, 1, NULL, desc);
|
||||
if (NULL == ctFont) {
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user