typedef const struct CF_BRIDGED_TYPE(UIFontDescriptor) __CTFontDescriptor * CTFontDescriptorRef;
typedef const struct CF_BRIDGED_TYPE(NSFontDescriptor) __CTFontDescriptor * CTFontDescriptorRef;
CFTypeID CTFontDescriptorGetTypeID( void ) CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontURLAttribute CT_AVAILABLE(10_6, 3_2);
CT_EXPORT const CFStringRef kCTFontNameAttribute CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontDisplayNameAttribute CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontFamilyNameAttribute CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontStyleNameAttribute CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontTraitsAttribute CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontVariationAttribute CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontSizeAttribute CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontMatrixAttribute CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontCascadeListAttribute CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontCharacterSetAttribute CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontLanguagesAttribute CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontBaselineAdjustAttribute CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontMacintoshEncodingsAttribute CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontFeaturesAttribute CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontFeatureSettingsAttribute CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontFixedAdvanceAttribute CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontOrientationAttribute CT_AVAILABLE(10_5, 3_2);
typedef CF_ENUM(uint32_t, CTFontOrientation) {
kCTFontOrientationDefault CT_ENUM_AVAILABLE(10_8, 6_0) = 0,
kCTFontOrientationHorizontal CT_ENUM_AVAILABLE(10_8, 6_0) = 1,
kCTFontOrientationVertical CT_ENUM_AVAILABLE(10_8, 6_0) = 2,
kCTFontDefaultOrientation CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontOrientationDefault,
kCTFontHorizontalOrientation CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontOrientationHorizontal,
kCTFontVerticalOrientation CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontOrientationVertical
};
CT_EXPORT const CFStringRef kCTFontFormatAttribute CT_AVAILABLE(10_6, 3_2);
typedef CF_ENUM(uint32_t, CTFontFormat) {
kCTFontFormatUnrecognized = 0,
kCTFontFormatOpenTypePostScript = 1,
kCTFontFormatOpenTypeTrueType = 2,
kCTFontFormatTrueType = 3,
kCTFontFormatPostScript = 4,
kCTFontFormatBitmap = 5
};
CT_EXPORT const CFStringRef kCTFontRegistrationScopeAttribute CT_AVAILABLE(10_6, 3_2);
CT_EXPORT const CFStringRef kCTFontPriorityAttribute CT_AVAILABLE(10_6, 3_2);
enum {
kCTFontPrioritySystem = 10000,
kCTFontPriorityNetwork = 20000,
kCTFontPriorityComputer = 30000,
kCTFontPriorityUser = 40000,
kCTFontPriorityDynamic = 50000,
kCTFontPriorityProcess = 60000
};
typedef uint32_t CTFontPriority;
CT_EXPORT const CFStringRef kCTFontEnabledAttribute CT_AVAILABLE(10_6, 3_2);
CT_EXPORT const CFStringRef kCTFontDownloadableAttribute CT_AVAILABLE(10_8, 6_0);
CT_EXPORT const CFStringRef kCTFontDownloadedAttribute CT_AVAILABLE(10_12, 7_0);
CTFontDescriptorRef CTFontDescriptorCreateWithNameAndSize(
CFStringRef name,
CGFloat size ) CT_AVAILABLE(10_5, 3_2);
CTFontDescriptorRef CTFontDescriptorCreateWithAttributes(
CFDictionaryRef attributes ) CT_AVAILABLE(10_5, 3_2);
CTFontDescriptorRef CTFontDescriptorCreateCopyWithAttributes(
CTFontDescriptorRef original,
CFDictionaryRef attributes ) CT_AVAILABLE(10_5, 3_2);
CTFontDescriptorRef __nullable CTFontDescriptorCreateCopyWithFamily(
CTFontDescriptorRef original,
CFStringRef family ) CT_AVAILABLE(10_9, 7_0);
CTFontDescriptorRef __nullable CTFontDescriptorCreateCopyWithSymbolicTraits(
CTFontDescriptorRef original,
CTFontSymbolicTraits symTraitValue,
CTFontSymbolicTraits symTraitMask ) CT_AVAILABLE(10_9, 7_0);
CTFontDescriptorRef CTFontDescriptorCreateCopyWithVariation(
CTFontDescriptorRef original,
CFNumberRef variationIdentifier,
CGFloat variationValue ) CT_AVAILABLE(10_5, 3_2);
CTFontDescriptorRef CTFontDescriptorCreateCopyWithFeature(
CTFontDescriptorRef original,
CFNumberRef featureTypeIdentifier,
CFNumberRef featureSelectorIdentifier ) CT_AVAILABLE(10_5, 3_2);
CFArrayRef __nullable CTFontDescriptorCreateMatchingFontDescriptors(
CTFontDescriptorRef descriptor,
CFSetRef __nullable mandatoryAttributes ) CT_AVAILABLE(10_5, 3_2);
CTFontDescriptorRef __nullable CTFontDescriptorCreateMatchingFontDescriptor(
CTFontDescriptorRef descriptor,
CFSetRef __nullable mandatoryAttributes ) CT_AVAILABLE(10_5, 3_2);
typedef CF_ENUM(uint32_t, CTFontDescriptorMatchingState) {
kCTFontDescriptorMatchingDidBegin, // called once at the beginning.
kCTFontDescriptorMatchingDidFinish, // called once at the end.
kCTFontDescriptorMatchingWillBeginQuerying, // called once before talking to the server. Skipped if not necessary.
kCTFontDescriptorMatchingStalled, // called when stalled. (e.g. while waiting for server response.)
// Downloading and activating are repeated for each descriptor.
kCTFontDescriptorMatchingWillBeginDownloading, // Downloading part may be skipped if all the assets are already downloaded
kCTFontDescriptorMatchingDownloading,
kCTFontDescriptorMatchingDidFinishDownloading,
kCTFontDescriptorMatchingDidMatch, // called when font descriptor is matched.
kCTFontDescriptorMatchingDidFailWithError // called when an error occurred. (may be called multiple times.)
};
CT_EXPORT const CFStringRef kCTFontDescriptorMatchingSourceDescriptor CT_AVAILABLE(10_8, 6_0);
CT_EXPORT const CFStringRef kCTFontDescriptorMatchingDescriptors CT_AVAILABLE(10_8, 6_0);
CT_EXPORT const CFStringRef kCTFontDescriptorMatchingResult CT_AVAILABLE(10_8, 6_0);
CT_EXPORT const CFStringRef kCTFontDescriptorMatchingPercentage CT_AVAILABLE(10_8, 6_0);
CT_EXPORT const CFStringRef kCTFontDescriptorMatchingCurrentAssetSize CT_AVAILABLE(10_8, 6_0);
CT_EXPORT const CFStringRef kCTFontDescriptorMatchingTotalDownloadedSize CT_AVAILABLE(10_8, 6_0);
CT_EXPORT const CFStringRef kCTFontDescriptorMatchingTotalAssetSize CT_AVAILABLE(10_8, 6_0);
CT_EXPORT const CFStringRef kCTFontDescriptorMatchingError CT_AVAILABLE(10_8, 6_0);
typedef bool (^CTFontDescriptorProgressHandler)(CTFontDescriptorMatchingState state, CFDictionaryRef progressParameter);
bool CTFontDescriptorMatchFontDescriptorsWithProgressHandler(
CFArrayRef descriptors,
CFSetRef __nullable mandatoryAttributes,
CTFontDescriptorProgressHandler progressBlock) CT_AVAILABLE(10_9, 6_0)
CFDictionaryRef CTFontDescriptorCopyAttributes(
CTFontDescriptorRef descriptor ) CT_AVAILABLE(10_5, 3_2);
CFTypeRef __nullable CTFontDescriptorCopyAttribute(
CTFontDescriptorRef descriptor,
CFStringRef attribute ) CT_AVAILABLE(10_5, 3_2);
CFTypeRef __nullable CTFontDescriptorCopyLocalizedAttribute(
CTFontDescriptorRef descriptor,
CFStringRef attribute,
CFStringRef __nullable * __nullable language ) CT_AVAILABLE(10_5, 3_2);