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
};
CTFontTrait
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 早上小苹果钻到被子里说自己是一只小乌龟 晚上小苹果看见家里财神储钱罐说要玩,玩着玩着说妈妈,消防车是用钱买的。我说...