CTFont

typedef const struct CF_BRIDGED_TYPE(UIFont) __CTFont * CTFontRef;
typedef const struct CF_BRIDGED_TYPE(NSFont) __CTFont * CTFontRef;

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

CT_EXPORT const CFStringRef kCTFontCopyrightNameKey CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontFamilyNameKey CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontSubFamilyNameKey CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontStyleNameKey CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontUniqueNameKey CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontFullNameKey CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontVersionNameKey CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontPostScriptNameKey CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontTrademarkNameKey CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontManufacturerNameKey CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontDesignerNameKey CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontDescriptionNameKey CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontVendorURLNameKey CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontDesignerURLNameKey CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontLicenseNameKey CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontLicenseURLNameKey CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontSampleTextNameKey CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontPostScriptCIDNameKey CT_AVAILABLE(10_5, 3_2);

CTFontRef CTFontCreateWithName(
    CFStringRef __nullable      name,
    CGFloat                     size,
    const CGAffineTransform * __nullable matrix ) CT_AVAILABLE(10_5, 3_2);

CTFontRef CTFontCreateWithFontDescriptor(
    CTFontDescriptorRef     descriptor,
    CGFloat                 size,
    const CGAffineTransform * __nullable matrix ) CT_AVAILABLE(10_5, 3_2);

typedef CF_OPTIONS(CFOptionFlags, CTFontOptions) {
    kCTFontOptionsDefault               = 0,
    kCTFontOptionsPreventAutoActivation = 1 << 0,
    kCTFontOptionsPreferSystemFont      = 1 << 2
};

CTFontRef CTFontCreateWithNameAndOptions(
    CFStringRef                 name,
    CGFloat                     size,
    const CGAffineTransform * __nullable matrix,
    CTFontOptions   

CTFontRef CTFontCreateWithFontDescriptorAndOptions(
    CTFontDescriptorRef     descriptor,
    CGFloat                 size,
    const CGAffineTransform * __nullable matrix,
    CTFontOptions           options ) CT_AVAILABLE(10_6, 3_2);

typedef CF_ENUM(uint32_t, CTFontUIFontType) {
    kCTFontUIFontNone                   CT_ENUM_AVAILABLE(10_8, 6_0) = (uint32_t)-1,
    kCTFontUIFontUser                   CT_ENUM_AVAILABLE(10_8, 6_0) =  0,
    kCTFontUIFontUserFixedPitch         CT_ENUM_AVAILABLE(10_8, 6_0) =  1,
    kCTFontUIFontSystem                 CT_ENUM_AVAILABLE(10_8, 6_0) =  2,
    kCTFontUIFontEmphasizedSystem       CT_ENUM_AVAILABLE(10_8, 6_0) =  3,
    kCTFontUIFontSmallSystem            CT_ENUM_AVAILABLE(10_8, 6_0) =  4,
    kCTFontUIFontSmallEmphasizedSystem  CT_ENUM_AVAILABLE(10_8, 6_0) =  5,
    kCTFontUIFontMiniSystem             CT_ENUM_AVAILABLE(10_8, 6_0) =  6,
    kCTFontUIFontMiniEmphasizedSystem   CT_ENUM_AVAILABLE(10_8, 6_0) =  7,
    kCTFontUIFontViews                  CT_ENUM_AVAILABLE(10_8, 6_0) =  8,
    kCTFontUIFontApplication            CT_ENUM_AVAILABLE(10_8, 6_0) =  9,
    kCTFontUIFontLabel                  CT_ENUM_AVAILABLE(10_8, 6_0) = 10,
    kCTFontUIFontMenuTitle              CT_ENUM_AVAILABLE(10_8, 6_0) = 11,
    kCTFontUIFontMenuItem               CT_ENUM_AVAILABLE(10_8, 6_0) = 12,
    kCTFontUIFontMenuItemMark           CT_ENUM_AVAILABLE(10_8, 6_0) = 13,
    kCTFontUIFontMenuItemCmdKey         CT_ENUM_AVAILABLE(10_8, 6_0) = 14,
    kCTFontUIFontWindowTitle            CT_ENUM_AVAILABLE(10_8, 6_0) = 15,
    kCTFontUIFontPushButton             CT_ENUM_AVAILABLE(10_8, 6_0) = 16,
    kCTFontUIFontUtilityWindowTitle     CT_ENUM_AVAILABLE(10_8, 6_0) = 17,
    kCTFontUIFontAlertHeader            CT_ENUM_AVAILABLE(10_8, 6_0) = 18,
    kCTFontUIFontSystemDetail           CT_ENUM_AVAILABLE(10_8, 6_0) = 19,
    kCTFontUIFontEmphasizedSystemDetail CT_ENUM_AVAILABLE(10_8, 6_0) = 20,
    kCTFontUIFontToolbar                CT_ENUM_AVAILABLE(10_8, 6_0) = 21,
    kCTFontUIFontSmallToolbar           CT_ENUM_AVAILABLE(10_8, 6_0) = 22,
    kCTFontUIFontMessage                CT_ENUM_AVAILABLE(10_8, 6_0) = 23,
    kCTFontUIFontPalette                CT_ENUM_AVAILABLE(10_8, 6_0) = 24,
    kCTFontUIFontToolTip                CT_ENUM_AVAILABLE(10_8, 6_0) = 25,
    kCTFontUIFontControlContent         CT_ENUM_AVAILABLE(10_8, 6_0) = 26,

    kCTFontNoFontType CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontUIFontNone,
    kCTFontUserFontType CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontUIFontUser,
    kCTFontUserFixedPitchFontType CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontUIFontUserFixedPitch,
    kCTFontSystemFontType CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontUIFontSystem,
    kCTFontEmphasizedSystemFontType CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontUIFontEmphasizedSystem,
    kCTFontSmallSystemFontType CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontUIFontSmallSystem,
    kCTFontSmallEmphasizedSystemFontType CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontUIFontSmallEmphasizedSystem,
    kCTFontMiniSystemFontType CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontUIFontMiniSystem,
    kCTFontMiniEmphasizedSystemFontType CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontUIFontMiniEmphasizedSystem,
    kCTFontViewsFontType CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontUIFontViews,
    kCTFontApplicationFontType CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontUIFontApplication,
    kCTFontLabelFontType CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontUIFontLabel,
    kCTFontMenuTitleFontType CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontUIFontMenuTitle,
    kCTFontMenuItemFontType CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontUIFontMenuItem,
    kCTFontMenuItemMarkFontType CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontUIFontMenuItemMark,
    kCTFontMenuItemCmdKeyFontType CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontUIFontMenuItemCmdKey,
    kCTFontWindowTitleFontType CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontUIFontWindowTitle,
    kCTFontPushButtonFontType CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontUIFontPushButton,
    kCTFontUtilityWindowTitleFontType CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontUIFontUtilityWindowTitle,
    kCTFontAlertHeaderFontType CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontUIFontAlertHeader,
    kCTFontSystemDetailFontType CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontUIFontSystemDetail,
    kCTFontEmphasizedSystemDetailFontType CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontUIFontEmphasizedSystemDetail,
    kCTFontToolbarFontType CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontUIFontToolbar,
    kCTFontSmallToolbarFontType CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontUIFontSmallToolbar,
    kCTFontMessageFontType CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontUIFontMessage,
    kCTFontPaletteFontType CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontUIFontPalette,
    kCTFontToolTipFontType CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontUIFontToolTip,
    kCTFontControlContentFontType CT_ENUM_DEPRECATED(10_5, 10_11, 3_2, 9_0) = kCTFontUIFontControlContent
};

CTFontRef __nullable CTFontCreateUIFontForLanguage(
    CTFontUIFontType    uiType,
    CGFloat             size,
    CFStringRef __nullable language ) CT_AVAILABLE(10_5, 3_2);

CTFontRef CTFontCreateCopyWithAttributes(
    CTFontRef                   font,
    CGFloat                     size,
    const CGAffineTransform * __nullable matrix,
    CTFontDescriptorRef __nullable attributes ) CT_AVAILABLE(10_5, 3_2);

CTFontRef __nullable CTFontCreateCopyWithSymbolicTraits(
    CTFontRef                   font,
    CGFloat                     size,
    const CGAffineTransform * __nullable matrix,
    CTFontSymbolicTraits        symTraitValue,
    CTFontSymbolicTraits        symTraitMask ) CT_AVAILABLE(10_5, 3_2);

CTFontRef __nullable CTFontCreateCopyWithFamily(
    CTFontRef                   font,
    CGFloat                     size,
    const CGAffineTransform * __nullable matrix,
    CFStringRef                 family ) CT_AVAILABLE(10_5, 3_2);

CTFontRef CTFontCreateForString(
    CTFontRef       currentFont,
    CFStringRef     string,
    CFRange         range ) CT_AVAILABLE(10_5, 3_2);

CTFontDescriptorRef CTFontCopyFontDescriptor(
    CTFontRef       font ) CT_AVAILABLE(10_5, 3_2);

CFTypeRef __nullable CTFontCopyAttribute(
    CTFontRef       font,
    CFStringRef     attribute ) CT_AVAILABLE(10_5, 3_2);

CGFloat CTFontGetSize( CTFontRef font ) CT_AVAILABLE(10_5, 3_2);

CGAffineTransform CTFontGetMatrix( CTFontRef font ) CT_AVAILABLE(10_5, 3_2);

CTFontSymbolicTraits CTFontGetSymbolicTraits( CTFontRef font ) CT_AVAILABLE(10_5, 3_2);

CFDictionaryRef CTFontCopyTraits( CTFontRef font ) CT_AVAILABLE(10_5, 3_2);

CFStringRef CTFontCopyPostScriptName( CTFontRef font ) CT_AVAILABLE(10_5, 3_2);

CFStringRef CTFontCopyFamilyName( CTFontRef font ) CT_AVAILABLE(10_5, 3_2);

CFStringRef CTFontCopyFullName( CTFontRef font ) CT_AVAILABLE(10_5, 3_2);

CFStringRef CTFontCopyDisplayName( CTFontRef font ) CT_AVAILABLE(10_5, 3_2);

CFStringRef __nullable CTFontCopyName(
    CTFontRef       font,
    CFStringRef     nameKey ) CT_AVAILABLE(10_5, 3_2);

CFStringRef __nullable CTFontCopyLocalizedName(
    CTFontRef       font,
    CFStringRef     nameKey,
    CFStringRef __nullable * __nullable actualLanguage ) CT_AVAILABLE(10_5, 3_2);

CFCharacterSetRef CTFontCopyCharacterSet( CTFontRef font ) CT_AVAILABLE(10_5, 3_2);

CFStringEncoding CTFontGetStringEncoding( CTFontRef font ) CT_AVAILABLE(10_5, 3_2);

CFArrayRef CTFontCopySupportedLanguages( CTFontRef font ) CT_AVAILABLE(10_5, 3_2);

bool CTFontGetGlyphsForCharacters(
    CTFontRef       font,
    const UniChar   characters[],
    CGGlyph         glyphs[],
    CFIndex         count ) CT_AVAILABLE(10_5, 3_2);

CGFloat CTFontGetAscent( CTFontRef font ) CT_AVAILABLE(10_5, 3_2);

CGFloat CTFontGetDescent( CTFontRef font ) CT_AVAILABLE(10_5, 3_2);

CGFloat CTFontGetLeading( CTFontRef font ) CT_AVAILABLE(10_5, 3_2);

unsigned CTFontGetUnitsPerEm( CTFontRef font ) CT_AVAILABLE(10_5, 3_2);

CFIndex CTFontGetGlyphCount( CTFontRef font ) CT_AVAILABLE(10_5, 3_2);

CGRect CTFontGetBoundingBox( CTFontRef font ) CT_AVAILABLE(10_5, 3_2);

CGFloat CTFontGetUnderlinePosition( CTFontRef font ) CT_AVAILABLE(10_5, 3_2);

CGFloat CTFontGetUnderlineThickness( CTFontRef font ) CT_AVAILABLE(10_5, 3_2);

CGFloat CTFontGetSlantAngle( CTFontRef font ) CT_AVAILABLE(10_5, 3_2);

CGFloat CTFontGetCapHeight( CTFontRef font ) CT_AVAILABLE(10_5, 3_2);

CGFloat CTFontGetXHeight( CTFontRef font ) CT_AVAILABLE(10_5, 3_2);

CGGlyph CTFontGetGlyphWithName(
    CTFontRef           font,
    CFStringRef         glyphName ) CT_AVAILABLE(10_5, 3_2);

CGRect CTFontGetBoundingRectsForGlyphs(
    CTFontRef           font,
    CTFontOrientation   orientation,
    const CGGlyph       glyphs[],
    CGRect * __nullable boundingRects,
    CFIndex             count ) CT_AVAILABLE(10_5, 3_2);

CGRect CTFontGetOpticalBoundsForGlyphs(
    CTFontRef           font,
    const CGGlyph       glyphs[],
    CGRect * __nullable boundingRects,
    CFIndex             count,
    CFOptionFlags       options ) CT_AVAILABLE(10_8, 6_0);

double CTFontGetAdvancesForGlyphs(
    CTFontRef           font,
    CTFontOrientation   orientation,
    const CGGlyph       glyphs[],
    CGSize * __nullable advances,
    CFIndex             count ) CT_AVAILABLE(10_5, 3_2);

void CTFontGetVerticalTranslationsForGlyphs(
    CTFontRef       font,
    const CGGlyph   glyphs[],
    CGSize          translations[],
    CFIndex         count ) CT_AVAILABLE(10_5, 3_2);

CGPathRef __nullable CTFontCreatePathForGlyph(
    CTFontRef                   font,
    CGGlyph                     glyph,
    const CGAffineTransform * __nullable matrix ) CT_AVAILABLE(10_5, 3_2);

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

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

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

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

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

CFArrayRef __nullable CTFontCopyVariationAxes( CTFontRef font ) CT_AVAILABLE(10_5, 3_2);

CFDictionaryRef __nullable CTFontCopyVariation( CTFontRef font ) CT_AVAILABLE(10_5, 3_2);

CT_EXPORT const CFStringRef kCTFontOpenTypeFeatureTag CT_AVAILABLE(10_10, 8_0);

CT_EXPORT const CFStringRef kCTFontOpenTypeFeatureValue CT_AVAILABLE(10_10, 8_0);

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

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

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

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

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

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

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

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

CFArrayRef __nullable CTFontCopyFeatures( CTFontRef font ) CT_AVAILABLE(10_5, 3_2);

CFArrayRef __nullable CTFontCopyFeatureSettings( CTFontRef font ) CT_AVAILABLE(10_5, 3_2);

CGFontRef CTFontCopyGraphicsFont(
    CTFontRef           font,
    CTFontDescriptorRef __nullable * __nullable attributes ) CT_AVAILABLE(10_5, 3_2);

CTFontRef CTFontCreateWithGraphicsFont(
    CGFontRef                   graphicsFont,
    CGFloat                     size,
    const CGAffineTransform * __nullable matrix,
    CTFontDescriptorRef __nullable attributes ) CT_AVAILABLE(10_5, 3_2);

ATSFontRef CTFontGetPlatformFont(
    CTFontRef               font,
    CTFontDescriptorRef __nullable * __nullable attributes ) CT_AVAILABLE_MAC(10_5);

CTFontRef __nullable CTFontCreateWithPlatformFont(
    ATSFontRef                  platformFont,
    CGFloat                     size,
    const CGAffineTransform * __nullable matrix,
    CTFontDescriptorRef __nullable attributes ) CT_AVAILABLE_MAC(10_5);

CTFontRef CTFontCreateWithQuickdrawInstance(
    ConstStr255Param __nullable name,
    int16_t             identifier,
    uint8_t             style,
    CGFloat             size ) CT_AVAILABLE_MAC(10_5);

typedef CF_OPTIONS(uint32_t, CTFontTableOptions) {
    kCTFontTableOptionNoOptions CT_ENUM_AVAILABLE(10_5, 3_2) = 0,
    kCTFontTableOptionExcludeSynthetic CT_ENUM_DEPRECATED(10_5, 10_8, 3_2, 6_0) = (1 << 0)
};

CFArrayRef __nullable CTFontCopyAvailableTables(
    CTFontRef           font,
    CTFontTableOptions  options ) CT_AVAILABLE(10_5, 3_2);

CFDataRef __nullable CTFontCopyTable(
    CTFontRef           font,
    CTFontTableTag      table,
    CTFontTableOptions  options ) CT_AVAILABLE(10_5, 3_2);

void CTFontDrawGlyphs(
    CTFontRef       font, 
    const CGGlyph   glyphs[], 
    const CGPoint   positions[], 
    size_t          count, 
    CGContextRef    context ) CT_AVAILABLE(10_7, 4_2);

CFIndex CTFontGetLigatureCaretPositions(
    CTFontRef       font,
    CGGlyph         glyph,
    CGFloat * __nullable positions,
    CFIndex         maxPositions ) CT_AVAILABLE(10_5, 3_2);

CT_EXPORT const CFStringRef kCTBaselineClassRoman CT_AVAILABLE(10_8, 6_0);
CT_EXPORT const CFStringRef kCTBaselineClassIdeographicCentered CT_AVAILABLE(10_8, 6_0);
CT_EXPORT const CFStringRef kCTBaselineClassIdeographicLow CT_AVAILABLE(10_8, 6_0);
CT_EXPORT const CFStringRef kCTBaselineClassIdeographicHigh CT_AVAILABLE(10_8, 6_0);
CT_EXPORT const CFStringRef kCTBaselineClassHanging CT_AVAILABLE(10_8, 6_0);
CT_EXPORT const CFStringRef kCTBaselineClassMath CT_AVAILABLE(10_8, 6_0);
CT_EXPORT const CFStringRef kCTBaselineReferenceFont CT_AVAILABLE(10_8, 6_0);
CT_EXPORT const CFStringRef kCTBaselineOriginalFont CT_AVAILABLE(10_8, 6_0);
CFArrayRef __nullable CTFontCopyDefaultCascadeListForLanguages( CTFontRef font, CFArrayRef __nullable languagePrefList ) CT_AVAILABLE(10_8, 6_0);






你可能感兴趣的:(CTFont)