CT_EXPORT const CFStringRef kCTFontSymbolicTrait CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontWeightTrait CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontWidthTrait CT_AVAILABLE(10_5, 3_2);
CT_EXPORT const CFStringRef kCTFontSlantTrait CT_AVAILABLE(10_5, 3_2);
enum {
kCTFontClassMaskShift = 28
};
typedef CF_OPTIONS(uint32_t, CTFontSymbolicTraits) {
kCTFontTraitItalic = (1 << 0), // Additional detail available via kCTFontSlantTrait
kCTFontTraitBold = (1 << 1), // Additional detail available via kCTFontWeightTrait
kCTFontTraitExpanded = (1 << 5), // Expanded and condensed traits are mutually exclusive
kCTFontTraitCondensed = (1 << 6), // Additional detail available via kCTFontWidthTrait
kCTFontTraitMonoSpace = (1 << 10), // Use fixed-pitch glyphs if available. May have multiple glyph advances (most CJK glyphs may contain two spaces)
kCTFontTraitVertical = (1 << 11), // Use vertical glyph variants and metrics
kCTFontTraitUIOptimized = (1 << 12), // Synthesize appropriate attributes for UI rendering such as control titles if necessary
kCTFontTraitColorGlyphs = (1 << 13), // Color bitmap glyphs are available.
kCTFontTraitComposite = (1 << 14), // The font is a CFR (Composite font reference), a cascade list is expected per font.
kCTFontTraitClassMask = (15U << kCTFontClassMaskShift),
// Mask for the font class
kCTFontItalicTrait = kCTFontTraitItalic,
kCTFontBoldTrait = kCTFontTraitBold,
kCTFontExpandedTrait = kCTFontTraitExpanded,
kCTFontCondensedTrait = kCTFontTraitCondensed,
kCTFontMonoSpaceTrait = kCTFontTraitMonoSpace,
kCTFontVerticalTrait = kCTFontTraitVertical,
kCTFontUIOptimizedTrait = kCTFontTraitUIOptimized,
kCTFontColorGlyphsTrait = kCTFontTraitColorGlyphs,
kCTFontCompositeTrait = kCTFontTraitComposite,
kCTFontClassMaskTrait = kCTFontTraitClassMask
};
typedef CF_OPTIONS(uint32_t, CTFontStylisticClass) {
kCTFontClassUnknown = (0 << kCTFontClassMaskShift),
kCTFontClassOldStyleSerifs = (1 << kCTFontClassMaskShift),
kCTFontClassTransitionalSerifs = (2 << kCTFontClassMaskShift),
kCTFontClassModernSerifs = (3 << kCTFontClassMaskShift),
kCTFontClassClarendonSerifs = (4 << kCTFontClassMaskShift),
kCTFontClassSlabSerifs = (5 << kCTFontClassMaskShift),
kCTFontClassFreeformSerifs = (7 << kCTFontClassMaskShift),
kCTFontClassSansSerif = (8U << kCTFontClassMaskShift),
kCTFontClassOrnamentals = (9U << kCTFontClassMaskShift),
kCTFontClassScripts = (10U << kCTFontClassMaskShift),
kCTFontClassSymbolic = (12U << kCTFontClassMaskShift),
kCTFontUnknownClass = kCTFontClassUnknown,
kCTFontOldStyleSerifsClass = kCTFontClassOldStyleSerifs,
kCTFontTransitionalSerifsClass = kCTFontClassTransitionalSerifs,
kCTFontModernSerifsClass = kCTFontClassModernSerifs,
kCTFontClarendonSerifsClass = kCTFontClassClarendonSerifs,
kCTFontSlabSerifsClass = kCTFontClassSlabSerifs,
kCTFontFreeformSerifsClass = kCTFontClassFreeformSerifs,
kCTFontSansSerifClass = kCTFontClassSansSerif,
kCTFontOrnamentalsClass = kCTFontClassOrnamentals,
kCTFontScriptsClass = kCTFontClassScripts,
kCTFontSymbolicClass = kCTFontClassSymbolic
};