CTFontCollection

typedef const struct CF_BRIDGED_TYPE(id) __CTFontCollection * CTFontCollectionRef;

typedef const struct CF_BRIDGED_TYPE(NSFontCollection) __CTFontCollection * CTFontCollectionRef;

typedef struct CF_BRIDGED_TYPE(id) __CTFontCollection * CTMutableFontCollectionRef;

typedef struct CF_BRIDGED_MUTABLE_TYPE(NSMutableFontCollection) __CTFontCollection * CTMutableFontCollectionRef;

CFTypeID CTFontCollectionGetTypeID( void ) CT_AVAILABLE(10_5, 3_2);

typedef CFComparisonResult (*CTFontCollectionSortDescriptorsCallback)(
    CTFontDescriptorRef first,
    CTFontDescriptorRef second,
    void *refCon );

CT_EXPORT const CFStringRef kCTFontCollectionRemoveDuplicatesOption CT_AVAILABLE(10_5, 3_2);

CT_EXPORT const CFStringRef kCTFontCollectionIncludeDisabledFontsOption CT_AVAILABLE_MAC(10_7);

CT_EXPORT const CFStringRef kCTFontCollectionDisallowAutoActivationOption CT_AVAILABLE_MAC(10_7);

CTFontCollectionRef CTFontCollectionCreateFromAvailableFonts(
    CFDictionaryRef __nullable options ) CT_AVAILABLE(10_5, 3_2);

CTFontCollectionRef CTFontCollectionCreateWithFontDescriptors(
    CFArrayRef __nullable queryDescriptors,
    CFDictionaryRef __nullable options ) CT_AVAILABLE(10_5, 3_2);

CTFontCollectionRef CTFontCollectionCreateCopyWithFontDescriptors(
    CTFontCollectionRef original,
    CFArrayRef __nullable queryDescriptors,
    CFDictionaryRef __nullable options ) CT_AVAILABLE(10_5, 3_2);

CTMutableFontCollectionRef CTFontCollectionCreateMutableCopy(
    CTFontCollectionRef original ) CT_AVAILABLE_MAC(10_7);

CFArrayRef __nullable CTFontCollectionCopyQueryDescriptors(
    CTFontCollectionRef collection ) CT_AVAILABLE_MAC(10_7);

void CTFontCollectionSetQueryDescriptors(
    CTMutableFontCollectionRef  collection,
    CFArrayRef __nullable       descriptors ) CT_AVAILABLE_MAC(10_7);

CFArrayRef __nullable CTFontCollectionCopyExclusionDescriptors( CTFontCollectionRef collection ) CT_AVAILABLE_MAC(10_7);

void CTFontCollectionSetExclusionDescriptors(
    CTMutableFontCollectionRef  collection,
    CFArrayRef __nullable       descriptors ) CT_AVAILABLE_MAC(10_7);

CFArrayRef __nullable CTFontCollectionCreateMatchingFontDescriptors(
    CTFontCollectionRef collection ) CT_AVAILABLE(10_5, 3_2);

CFArrayRef __nullable CTFontCollectionCreateMatchingFontDescriptorsSortedWithCallback(
    CTFontCollectionRef                     collection,
    CTFontCollectionSortDescriptorsCallback __nullable sortCallback,
    void * __nullable                       refCon ) CT_AVAILABLE(10_5, 3_2);

CFArrayRef __nullable CTFontCollectionCreateMatchingFontDescriptorsWithOptions(
    CTFontCollectionRef collection,
    CFDictionaryRef __nullable options ) CT_AVAILABLE_MAC(10_7);

CFArrayRef __nullable CTFontCollectionCreateMatchingFontDescriptorsForFamily(
    CTFontCollectionRef collection,
    CFStringRef         familyName,
    CFDictionaryRef __nullable options ) CT_AVAILABLE_MAC(10_7);

typedef CF_OPTIONS(uint32_t, CTFontCollectionCopyOptions) {
    kCTFontCollectionCopyDefaultOptions = 0,
    kCTFontCollectionCopyUnique = (1 << 0),
    kCTFontCollectionCopyStandardSort = (1 << 1)
} CT_AVAILABLE_MAC(10_7);

CFArrayRef CTFontCollectionCopyFontAttribute(
    CTFontCollectionRef         collection,
    CFStringRef                 attributeName,
    CTFontCollectionCopyOptions options ) CT_AVAILABLE_MAC(10_7);

CFArrayRef CTFontCollectionCopyFontAttributes(
    CTFontCollectionRef         collection,
    CFSetRef                    attributeNames,
    CTFontCollectionCopyOptions options ) CT_AVAILABLE_MAC(10_7);



最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 暗恋 如同在黑夜里怒放的花朵 无人问津孤芳自赏 你从不自知,而我也只能远远望 失恋 你在左心室里叫嚣 将呼吸轻轻放...
    安夏茉阅读 1,565评论 57 67
  • 四年前,我从陇南大山深处走了出来,来到了洪都南昌,一身土气,不肯认输的我,对自己的大学生活做了规划,这源自父亲临别...
    船舵手阅读 294评论 0 1
  • 听听夏雨 睡至半夜,听到窗外噼噼啪啪的声音,毫...
    拙兰阅读 742评论 10 21
  • 列夫托尔斯泰曾经说过:幸福的家庭都是相似的,而不幸的家庭却各有各的不幸。家庭是社会的组成部分,他给人一种归宿感。家...
    王胤升阅读 5,107评论 3 6
  • 1. 那日,同事Z又添了一辆坐骑,价值13w+,是我小白龙的两倍。办公室众同事听说此事后对Z极力恭维,好不热闹。正...
    一农小语阅读 638评论 0 3