该类从以下四个方面来学习。
1.Descriptor Types
|
|
2.Descriptor Constants
| ke’y | value | 解释 |
|---|---|---|
| kCTFontURLAttribute | CFURLRef | 通过 descriptor 访问字体的url |
| kCTFontNameAttribute | CFStringRef | 先从 PostScript arr 中找, 没发现在从 family 数字找,没发现 用 display name 。, 如果还是从字体列表中没找到,默认返回 Helvetica 字体 |
| kCTFontDisplayNameAttribute | CFStringRef | 这个返回display name 大多数是 the full name。 |
| kCTFontFamilyNameAttribute | CFStringRef | 返回 family name |
| kCTFontStyleNameAttribute | CFStringRef | 返回 the style name of the font。代表设计者对该字体样式的描述。 |
| kCTFontTraitsAttribute | CFDictionaryRef | 返回改字体的特性 traits 字典。 |
| kCTFontVariationAttribute | CFDictionaryRef | 不知道啥用 |
| kCTFontSizeAttribute | CFNumberRef | 返回字体的大小 |
| kCTFontMatrixAttribute | CFDataRef | 该data是 CGAffineTransform信息 |
| kCTFontCascadeListAttribute | CFArrayRef | 级联表格数组,具体干嘛的不知道。看结果在说 |
| kCTFontCharacterSetAttribute | CFCharacterSetRef | |
| kCTFontLanguagesAttribute | CFArrayRef | |
| kCTFontBaselineAdjustAttribute | CFNumberRef | |
| kCTFontMacintoshEncodingsAttribute | CFNumberRef | |
| kCTFontFeaturesAttribute | CFArrayRef | |
| kCTFontFeatureSettingsAttribute | ||
| kCTFontFixedAdvanceAttribute | CFNumberRef | |
| kCTFontOrientationAttribute | CFNumberRef | |
| kCTFontFormatAttribute | CFNumber | |
| kCTFontRegistrationScopeAttribute | CTFontManagerScope | |
| kCTFontPriorityAttribute | ||
| kCTFontEnabledAttribute | ||
| kCTFontDownloadableAttribute | ||
| kCTFontDownloadedAttribute |
|
|
|
|
3.Descriptor Creation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
keys for progressParameter dictionary
| key | value | |
|---|---|---|
| kCTFontDescriptorMatchingSourceDescriptor | ||
| kCTFontDescriptorMatchingDescriptors | ||
| kCTFontDescriptorMatchingResult | ||
| kCTFontDescriptorMatchingPercentage | ||
| kCTFontDescriptorMatchingCurrentAssetSize | ||
| kCTFontDescriptorMatchingTotalDownloadedSize | ||
| kCTFontDescriptorMatchingTotalAssetSize | ||
| kCTFontDescriptorMatchingError |
|
|
4.Descriptor Accessors
|
|
|
|
###