|
|
富文本离不开文字,下面我们学下字体Font
字体内容较多,我们从以下方面学下。
1.Font Types
|
|
2.Font Constants
kCTFontCopyrightNameKey | 版权key |
---|---|
kCTFontFamilyNameKey | family(家族) key |
kCTFontSubFamilyNameKey | subfamily(子家族)key |
kCTFontStyleNameKey | 字体style key |
kCTFontUniqueNameKey | 独一无二key(value不是真的独一无二,不应该假设唯一) |
kCTFontFullNameKey | 字体全名key |
kCTFontVersionNameKey | 字体版本号key |
kCTFontPostScriptNameKey | 字体补充说明key |
kCTFontTrademarkNameKey | 商标key |
kCTFontManufacturerNameKey | 制造商key |
kCTFontDesignerNameKey | 设计者key |
kCTFontDescriptionNameKey | 字体描述key |
kCTFontVendorURLNameKey | 供应商url key |
kCTFontLicenseNameKey | 许可证key |
kCTFontLicenseURLNameKey | 许可证url key |
kCTFontSampleTextNameKey | 简单text key |
kCTFontPostScriptCIDNameKey | 补充说明CID key |
这些key 暂时不知道干嘛用的。
3.Font Creation
|
|
结果:
|
|
效果:
|
|
|
|
|
|
|
|
|
|
|
|
4.Font Cascading
|
|
5.Font Accessors
|
|
|
|
|
|
|
|
|
|
|
|
6.Font Names
|
|
|
|
|
|
|
|
|
|
|
|
7.Font Encoding
|
|
|
|
|
|
|
|
8.Font Metrics
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9.Font Glyphs
|
|
|
|
|
|
|
|
|
|
|
|
10.Font Variations
key | value | 解释 |
---|---|---|
kCTFontVariationAxisIdentifierKey | CFNumberRef | axis identifier |
kCTFontVariationAxisMinimumValueKey | CFNumberRef | minimum axis |
kCTFontVariationAxisMaximumValueKey | CFNumberRef | maximum axis |
kCTFontVariationAxisDefaultValueKey | CFNumberRef | default axis |
kCTFontVariationAxisNameKey | CFNumberRef | the localized variation axis name. |
|
|
|
|
11.Font Features
key | value | 描述 |
---|---|---|
kCTFontOpenTypeFeatureTag | CFStringRef | |
kCTFontOpenTypeFeatureValue | CFNumberRef | |
kCTFontFeatureTypeIdentifierKey | CFNumberRef | |
kCTFontFeatureTypeNameKey | CFString | |
kCTFontFeatureTypeExclusiveKey | CFBoolean | |
kCTFontFeatureTypeSelectorsKey | CFArrayRef | |
kCTFontFeatureSelectorIdentifierKey | CFNumberRef | |
kCTFontFeatureSelectorNameKey | CFStringRef | |
kCTFontFeatureSelectorDefaultKey | CFBooleanRef | |
kCTFontFeatureSelectorSettingKey | CFBooleanRef |
|
|
|
|
12.Font Conversion
|
|
|
|
|
|
|
|
|
|
13.Font Tables
|
|
|
|
|
|
|
|
|
|
|
|
14.Baseline Alignment
key | value | 描述 |
---|---|---|
kCTBaselineClassRoman | CFNumberRef | |
kCTBaselineClassIdeographicCentered | CFNumberRef | |
kCTBaselineClassIdeographicLow | CFNumberRef | |
kCTBaselineClassIdeographicHigh | CFNumberRef | |
kCTBaselineClassHanging | CFNumberRef | |
kCTBaselineClassMath | CFNumberRef | |
kCTBaselineReferenceFont | CTFontRef | |
kCTBaselineOriginalFont |
|
|