CTStringAttributes 扩展属性

Core Text 框架是处理文本内容的一个专门框架,在这个框架里面定义和约束了所有的文本字体和字形相关的属性定义。在 CTStringAttributes 这个头文件里面定义了21种扩展属性,分别对字体和字形的属性方面进行了详细的定义。

  1. KCTFontAttributeName :设置字体属性 (大小和字体)

  2. KCTForegroundColorFromContextAttributeName :从上下文中获取前景色

  3. KCTKernAttributeName : 字符间距

  4. KCTLigatureAttributeName :控制连体字的信息

  5. KCTForegroundColorAttributeName : 前景色

  6. KCTParagraphStyleAttributeName : 段落样式

  1. KCTStrokeWidthAttributeName :描边的宽度

  2. KCTStrokeColorAttributeName : 描边的颜色

  3. KCTUnderlineStyleAttributeName : 下划线样式

  4. KCTSuperscriptAttributeName : 临时脚本

  5. KCTUnderlineColorAttributeName :下划线颜色

  6. KCTVerticalFormsAttributeName :控制字形方向

  1. KCTGlyphInfoAttributeName : 使用未编码的字形

  2. KCTCharacterShapeAttributeName : 控制字形的选择

  3. KCTLanguageAttributeName :指定文本的语言

  4. KCTRunDelegateAttributeName :控制部分文字的外观

  5. KCTBaselineClassAttributeName :引用重写基线的类

  6. KCTBaselineInfoAttributeName : 引用基线信息的属性

  1. KCTBaselineReferenceInfoAttributeName :关键参考基线信息字典的参考标准

  2. KCTWritingDirectionAttributeName :指定一个双向覆盖或者嵌入 (设置书写方向)

  3. KCTRubyAnnotationAttributeName : 引用一个 CTRubyAnnotation 的关键