Lines Matching refs:SkUniqueCFRef
77 static SkUniqueCFRef<CFStringRef> make_CFString(const char s[]) { in make_CFString()
78 return SkUniqueCFRef<CFStringRef>(CFStringCreateWithCString(nullptr, s, kCFStringEncodingUTF8)); in make_CFString()
392 SkUniqueCFRef<CGColorSpaceRef> colorspace(CGColorSpaceCreateDeviceRGB()); in smooth_behavior()
393 SkUniqueCFRef<CGContextRef> noSmoothContext( in smooth_behavior()
396 SkUniqueCFRef<CGContextRef> smoothContext( in smooth_behavior()
400 SkUniqueCFRef<CGDataProviderRef> data( in smooth_behavior()
403 SkUniqueCFRef<CGFontRef> cgFont(CGFontCreateWithDataProvider(data.get())); in smooth_behavior()
405 SkUniqueCFRef<CTFontRef> ctFont( in smooth_behavior()
467 SkUniqueCFRef<CGColorSpaceRef> fRGBSpace;
470 SkUniqueCFRef<CGContextRef> fCG;
686 SkUniqueCFRef<CFTypeRef> traits(CTFontDescriptorCopyAttribute(desc, kCTFontTraitsAttribute)); in fontstyle_from_descriptor()
690 SkUniqueCFRef<CFDictionaryRef> fontTraitsDict(static_cast<CFDictionaryRef>(traits.release())); in fontstyle_from_descriptor()
711 SkTypeface_Mac(SkUniqueCFRef<CTFontRef> fontRef, SkUniqueCFRef<CFTypeRef> resourceRef, in SkTypeface_Mac()
724 SkUniqueCFRef<CTFontRef> fFontRef;
725 SkUniqueCFRef<CFTypeRef> fOriginatingCFTypeRef;
764 static sk_sp<SkTypeface> create_from_CTFontRef(SkUniqueCFRef<CTFontRef> font, in create_from_CTFontRef()
765 SkUniqueCFRef<CFTypeRef> resource, in create_from_CTFontRef()
776 SkUniqueCFRef<CTFontDescriptorRef> desc(CTFontCopyFontDescriptor(font.get())); in create_from_CTFontRef()
791 SkUniqueCFRef<CTFontRef> ctFont(CTFontCreateWithFontDescriptor(desc, 0, nullptr)); in create_from_desc()
799 static SkUniqueCFRef<CTFontDescriptorRef> create_descriptor(const char familyName[], in create_descriptor()
801 SkUniqueCFRef<CFMutableDictionaryRef> cfAttributes( in create_descriptor()
806 SkUniqueCFRef<CFMutableDictionaryRef> cfTraits( in create_descriptor()
820 SkUniqueCFRef<CFNumberRef> cfFontWeight( in create_descriptor()
827 SkUniqueCFRef<CFNumberRef> cfFontWidth( in create_descriptor()
834 SkUniqueCFRef<CFNumberRef> cfFontSlant( in create_descriptor()
844 SkUniqueCFRef<CFStringRef> cfFontName = make_CFString(familyName); in create_descriptor()
850 return SkUniqueCFRef<CTFontDescriptorRef>( in create_descriptor()
856 SkUniqueCFRef<CTFontDescriptorRef> desc = create_descriptor(familyName, style); in create_from_name()
873 return create_from_CTFontRef(SkUniqueCFRef<CTFontRef>(font), in SkCreateTypefaceFromCTFont()
874 SkUniqueCFRef<CFTypeRef>(resource), in SkCreateTypefaceFromCTFont()
934 SkUniqueCFRef<CTFontRef> fCTFont;
940 SkUniqueCFRef<CGFontRef> fCGFont;
954 static SkUniqueCFRef<CTFontRef> ctfont_create_exact_copy(CTFontRef baseFont, CGFloat textSize, in ctfont_create_exact_copy()
957 SkUniqueCFRef<CGFontRef> baseCGFont(CTFontCopyGraphicsFont(baseFont, nullptr)); in ctfont_create_exact_copy()
967 return SkUniqueCFRef<CTFontRef>( in ctfont_create_exact_copy()
1184 SkUniqueCFRef<CGPathRef> path(CTFontCreatePathForGlyph(fCTFont.get(), cgGlyph,nullptr)); in generateMetrics()
1448 SkUniqueCFRef<CGPathRef> cgPath(CTFontCreatePathForGlyph(fCTFont.get(), cgGlyph, &xform)); in generatePath()
1558 static sk_sp<SkTypeface> create_from_dataProvider(SkUniqueCFRef<CGDataProviderRef> provider, in create_from_dataProvider()
1563 SkUniqueCFRef<CGFontRef> cg(CGFontCreateWithDataProvider(provider.get())); in create_from_dataProvider()
1567 SkUniqueCFRef<CTFontRef> ct(CTFontCreateWithGraphicsFont(cg.get(), 0, nullptr, nullptr)); in create_from_dataProvider()
1601 SkUniqueCFRef<CFCharacterSetRef> charSet(CTFontCopyCharacterSet(ctFont)); in populate_glyph_to_unicode()
1607 SkUniqueCFRef<CFDataRef> bitmap( in populate_glyph_to_unicode()
1654 SkUniqueCFRef<CTFontRef> ctFont = in getGlyphToUnicodeMap()
1664 SkUniqueCFRef<CTFontRef> ctFont = in onGetAdvancedMetrics()
1670 SkUniqueCFRef<CFStringRef> fontName(CTFontCopyPostScriptName(ctFont.get())); in onGetAdvancedMetrics()
1681 SkUniqueCFRef<CGFontRef> cgFont(CTFontCopyGraphicsFont(ctFont.get(), nullptr)); in onGetAdvancedMetrics()
1683 SkUniqueCFRef<CFArrayRef> cgAxes(CGFontCopyVariationAxes(cgFont.get())); in onGetAdvancedMetrics()
1758 SkUniqueCFRef<CFNumberRef> fontFormatRef( in get_font_type_tag()
1939 SkUniqueCFRef<CGFontRef> cgFont(CTFontCopyGraphicsFont(ctFont, nullptr)); in get_variations()
1944 SkUniqueCFRef<CFDictionaryRef> cgVariations(CGFontCopyVariations(cgFont.get())); in get_variations()
1950 SkUniqueCFRef<CFArrayRef> cgAxes(CGFontCopyVariationAxes(cgFont.get())); in get_variations()
2005 static SkUniqueCFRef<CFDictionaryRef> ct_variation_from_cg_variation(CFDictionaryRef cgVariations, in ct_variation_from_cg_variation()
2008 SkUniqueCFRef<CFMutableDictionaryRef> ctVariations( in ct_variation_from_cg_variation()
2050 SkUniqueCFRef<CFArrayRef> ctAxes(CTFontCopyVariationAxes(fFontRef.get())); in onGetVariationDesignPosition()
2062 SkUniqueCFRef<CFDictionaryRef> ctVariations(CTFontCopyVariation(fFontRef.get())); in onGetVariationDesignPosition()
2066 SkUniqueCFRef<CGFontRef> cgFont(CTFontCopyGraphicsFont(fFontRef.get(), nullptr)); in onGetVariationDesignPosition()
2070 SkUniqueCFRef<CFDictionaryRef> cgVariations(CGFontCopyVariations(cgFont.get())); in onGetVariationDesignPosition()
2128 SkUniqueCFRef<CGFontRef> cgFont(CTFontCopyGraphicsFont(fFontRef.get(), nullptr)); in onGetUPEM()
2137 SkUniqueCFRef<CFStringRef> cfFamilyName( in onCreateFamilyNameIterator()
2139 SkUniqueCFRef<CFStringRef> cfLanguage(cfLanguageRaw); in onCreateFamilyNameIterator()
2158 SkUniqueCFRef<CFArrayRef> cfArray( in onGetTableTags()
2177 static SkUniqueCFRef<CFDataRef> copy_table_from_font(CTFontRef ctFont, SkFontTableTag tag) { in copy_table_from_font()
2178 SkUniqueCFRef<CFDataRef> data(CTFontCopyTable(ctFont, (CTFontTableTag) tag, in copy_table_from_font()
2181 SkUniqueCFRef<CGFontRef> cgFont(CTFontCopyGraphicsFont(ctFont, nullptr)); in copy_table_from_font()
2189 SkUniqueCFRef<CFDataRef> srcData = copy_table_from_font(fFontRef.get(), tag); in onGetTableData()
2416 SkUniqueCFRef<CFStringRef> ref((CFStringRef)CTFontDescriptorCopyAttribute(desc, name)); in find_desc_str()
2482 SkUniqueCFRef<CFArrayRef> fArray;
2506 SkUniqueCFRef<CFArrayRef> fNames;
2515 SkUniqueCFRef<CFMutableDictionaryRef> cfAttr( in CreateSet()
2522 SkUniqueCFRef<CTFontDescriptorRef> desc( in CreateSet()
2530 static SkUniqueCFRef<CFArrayRef> CopyAvailableFontFamilyNames() { in CopyAvailableFontFamilyNames()
2532 return SkUniqueCFRef<CFArrayRef>(CFArrayCreate(nullptr, nullptr, 0, nullptr)); in CopyAvailableFontFamilyNames()
2534 return SkUniqueCFRef<CFArrayRef>(CTFontManagerCopyAvailableFontFamilyNames()); in CopyAvailableFontFamilyNames()
2567 SkUniqueCFRef<CFStringRef> cfName = make_CFString(familyName); in onMatchFamily()
2573 SkUniqueCFRef<CTFontDescriptorRef> desc = create_descriptor(familyName, style); in onMatchFamilyStyle()
2581 SkUniqueCFRef<CTFontDescriptorRef> desc = create_descriptor(familyName, style); in onMatchFamilyStyleCharacter()
2582 SkUniqueCFRef<CTFontRef> familyFont(CTFontCreateWithFontDescriptor(desc.get(), 0, nullptr)); in onMatchFamilyStyleCharacter()
2591 SkUniqueCFRef<CFStringRef> string(CFStringCreateWithBytes( in onMatchFamilyStyleCharacter()
2595 SkUniqueCFRef<CTFontRef> fallbackFont( in onMatchFamilyStyleCharacter()
2606 SkUniqueCFRef<CGDataProviderRef> pr(SkCreateDataProviderFromData(std::move(data))); in onMakeFromData()
2615 SkUniqueCFRef<CGDataProviderRef> pr(SkCreateDataProviderFromStream(std::move(stream))); in onMakeFromStreamIndex()
2623 static SkUniqueCFRef<CFDictionaryRef> copy_axes(CGFontRef cg, const SkFontArguments& args) { in copy_axes()
2629 SkUniqueCFRef<CTFontRef> ct(CTFontCreateWithGraphicsFont(cg, 0, nullptr, nullptr)); in copy_axes()
2632 SkUniqueCFRef<CFArrayRef> ctAxes(CTFontCopyVariationAxes(ct.get())); in copy_axes()
2640 SkUniqueCFRef<CFMutableDictionaryRef> dict( in copy_axes()
2704 SkUniqueCFRef<CFNumberRef> valueNumber( in copy_axes()
2715 SkUniqueCFRef<CGDataProviderRef> provider(SkCreateDataProviderFromStream(std::move(s))); in onMakeFromStreamArgs()
2719 SkUniqueCFRef<CGFontRef> cg(CGFontCreateWithDataProvider(provider.get())); in onMakeFromStreamArgs()
2724 SkUniqueCFRef<CFDictionaryRef> cgVariations = copy_axes(cg.get(), args); in onMakeFromStreamArgs()
2728 SkUniqueCFRef<CGFontRef> cgVariant; in onMakeFromStreamArgs()
2735 SkUniqueCFRef<CTFontRef> ct( in onMakeFromStreamArgs()
2744 static SkUniqueCFRef<CFDictionaryRef> copy_axes(CGFontRef cg, SkFontData* fontData) { in copy_axes()
2745 SkUniqueCFRef<CFArrayRef> cgAxes(CGFontCopyVariationAxes(cg)); in copy_axes()
2755 SkUniqueCFRef<CFMutableDictionaryRef> dict( in copy_axes()
2791 SkUniqueCFRef<CFNumberRef> valueNumber( in copy_axes()
2801 SkUniqueCFRef<CGDataProviderRef> provider( in onMakeFromFontData()
2806 SkUniqueCFRef<CGFontRef> cg(CGFontCreateWithDataProvider(provider.get())); in onMakeFromFontData()
2811 SkUniqueCFRef<CFDictionaryRef> cgVariations = copy_axes(cg.get(), fontData.get()); in onMakeFromFontData()
2815 SkUniqueCFRef<CGFontRef> cgVariant; in onMakeFromFontData()
2822 SkUniqueCFRef<CTFontRef> ct( in onMakeFromFontData()
2831 SkUniqueCFRef<CGDataProviderRef> pr(CGDataProviderCreateWithFilename(path)); in onMakeFromFile()