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);



你可能感兴趣的:(CTFontCollection)