Lines Matching refs:SkUniqueCFRef

43 static SkUniqueCFRef<CFStringRef> make_CFString(const char s[]) {  in make_CFString()
44 return SkUniqueCFRef<CFStringRef>(CFStringCreateWithCString(nullptr, s, kCFStringEncodingUTF8)); in make_CFString()
49 SkUniqueCFRef<CTFontRef> ctFont(CTFontCreateWithFontDescriptor(desc, 0, nullptr)); in create_from_desc()
57 static SkUniqueCFRef<CTFontDescriptorRef> create_descriptor(const char familyName[], in create_descriptor()
59 SkUniqueCFRef<CFMutableDictionaryRef> cfAttributes( in create_descriptor()
64 SkUniqueCFRef<CFMutableDictionaryRef> cfTraits( in create_descriptor()
95 SkUniqueCFRef<CFNumberRef> cfFontTraits( in create_descriptor()
104 SkUniqueCFRef<CFNumberRef> cfFontWeight( in create_descriptor()
111 SkUniqueCFRef<CFNumberRef> cfFontWidth( in create_descriptor()
120 SkUniqueCFRef<CFNumberRef> cfFontSlant( in create_descriptor()
131 SkUniqueCFRef<CFStringRef> cfFontName = make_CFString(familyName); in create_descriptor()
137 return SkUniqueCFRef<CTFontDescriptorRef>( in create_descriptor()
147 SkUniqueCFRef<CTFontRef> ctFont(CTFontCreateWithFontDescriptor(desc, 0, nullptr)); in create_from_desc_and_style()
162 SkUniqueCFRef<CTFontRef> ctNewFont(CTFontCreateCopyWithSymbolicTraits( in create_from_desc_and_style()
174 SkUniqueCFRef<CTFontDescriptorRef> desc = create_descriptor(familyName, style); in create_from_name()
208 SkUniqueCFRef<CFArrayRef> ctAxes(CTFontCopyVariationAxes(ct)); in ctvariation_from_skfontdata()
218 SkUniqueCFRef<CFMutableDictionaryRef> dict( in ctvariation_from_skfontdata()
266 SkUniqueCFRef<CFNumberRef> valueNumber( in ctvariation_from_skfontdata()
270 return { SkUniqueCFRef<CFDictionaryRef>(std::move(dict)), nullptr, opsz }; in ctvariation_from_skfontdata()
284 static SkUniqueCFRef<CFDataRef> cfdata_from_skdata(sk_sp<SkData> data) { in cfdata_from_skdata()
302 SkUniqueCFRef<CFAllocatorRef> alloc(CFAllocatorCreate(kCFAllocatorDefault, &ctx)); in cfdata_from_skdata()
303 return SkUniqueCFRef<CFDataRef>(CFDataCreateWithBytesNoCopy( in cfdata_from_skdata()
307 static SkUniqueCFRef<CTFontRef> ctfont_from_skdata(sk_sp<SkData> data, int ttcIndex) { in ctfont_from_skdata()
313 SkUniqueCFRef<CFDataRef> cfData(cfdata_from_skdata(std::move(data))); in ctfont_from_skdata()
315 SkUniqueCFRef<CTFontDescriptorRef> desc( in ctfont_from_skdata()
320 return SkUniqueCFRef<CTFontRef>(CTFontCreateWithFontDescriptor(desc.get(), 0, nullptr)); in ctfont_from_skdata()
324 SkUniqueCFRef<CFStringRef> ref((CFStringRef)CTFontDescriptorCopyAttribute(desc, name)); in find_desc_str()
388 SkUniqueCFRef<CFArrayRef> fArray;
411 SkUniqueCFRef<CFArrayRef> SkCopyAvailableFontFamilyNames(CTFontCollectionRef collection) { in SkCopyAvailableFontFamilyNames()
413 SkUniqueCFRef<CFArrayRef> descriptors( in SkCopyAvailableFontFamilyNames()
420 SkUniqueCFRef<CFTypeRef> familyName( in SkCopyAvailableFontFamilyNames()
426 SkUniqueCFRef<CFMutableSetRef> familyNameSet( in SkCopyAvailableFontFamilyNames()
442 return SkUniqueCFRef<CFArrayRef>( in SkCopyAvailableFontFamilyNames()
447 SkUniqueCFRef<CFArrayRef> SkCTFontManagerCopyAvailableFontFamilyNames() { in SkCTFontManagerCopyAvailableFontFamilyNames()
454 return SkUniqueCFRef<CFArrayRef>(ctFontManagerCopyAvailableFontFamilyNames()); in SkCTFontManagerCopyAvailableFontFamilyNames()
456 SkUniqueCFRef<CTFontCollectionRef> collection( in SkCTFontManagerCopyAvailableFontFamilyNames()
458 return SkUniqueCFRef<CFArrayRef>(SkCopyAvailableFontFamilyNames(collection.get())); in SkCTFontManagerCopyAvailableFontFamilyNames()
460 return SkUniqueCFRef<CFArrayRef>(CTFontManagerCopyAvailableFontFamilyNames()); in SkCTFontManagerCopyAvailableFontFamilyNames()
467 SkUniqueCFRef<CFArrayRef> fNames;
476 SkUniqueCFRef<CFMutableDictionaryRef> cfAttr( in CreateSet()
483 SkUniqueCFRef<CTFontDescriptorRef> desc( in CreateSet()
489 SkUniqueCFRef<CTFontCollectionRef> fFontCollection;
522 SkUniqueCFRef<CFStringRef> cfName = make_CFString(familyName); in onMatchFamily()
528 SkUniqueCFRef<CTFontDescriptorRef> desc = create_descriptor(familyName, style); in onMatchFamilyStyle()
536 SkUniqueCFRef<CTFontDescriptorRef> desc = create_descriptor(familyName, style); in onMatchFamilyStyleCharacter()
537 SkUniqueCFRef<CTFontRef> familyFont(CTFontCreateWithFontDescriptor(desc.get(), 0, nullptr)); in onMatchFamilyStyleCharacter()
546 SkUniqueCFRef<CFStringRef> string(CFStringCreateWithBytes( in onMatchFamilyStyleCharacter()
555 SkUniqueCFRef<CTFontRef> fallbackFont( in onMatchFamilyStyleCharacter()
565 SkUniqueCFRef<CTFontRef> ct = ctfont_from_skdata(data, ttcIndex); in onMakeFromData()
584 SkUniqueCFRef<CTFontRef> ct = ctfont_from_skdata(std::move(data), ttcIndex); in onMakeFromStreamIndex()
605 SkUniqueCFRef<CTFontRef> ct = ctfont_from_skdata(std::move(data), ttcIndex); in onMakeFromStreamArgs()
612 SkUniqueCFRef<CTFontRef> ctVariant; in onMakeFromStreamArgs()
614 SkUniqueCFRef<CFMutableDictionaryRef> attributes( in onMakeFromStreamArgs()
620 SkUniqueCFRef<CTFontDescriptorRef> varDesc( in onMakeFromStreamArgs()
643 SkUniqueCFRef<CTFontRef> ct = ctfont_from_skdata(std::move(data), fontData->getIndex()); in onMakeFromFontData()
650 SkUniqueCFRef<CTFontRef> ctVariant; in onMakeFromFontData()
652 SkUniqueCFRef<CFMutableDictionaryRef> attributes( in onMakeFromFontData()
658 SkUniqueCFRef<CTFontDescriptorRef> varDesc( in onMakeFromFontData()