插件 / API文档 / TextAttributes:富文本属性

TextAttributes:富文本属性

可对文本图层中部分文本片段生效。


alignment: Alignment 
文本对齐方式。


kerning: number 
字间距。


lineHeight: number
行间距。


paragraphSpacing: number
段间距。


textColor: Color
文本颜色: RGB颜色值。


fontSize: number 
字体的大小。


textTransform: TextTransform
文本转换: 水平翻转、垂直翻转。


postscript: string
字体修改fontFamily fontStyle fontWeight 时, 需要通过设置当前属性更改。


fontFamily: string [readonly] 
字体名称。


fontStyle: string [readonly] 
字体样式: 填充、边框、外阴影、内阴影、模糊,该属性设置对整个文本图层生效。


fontWeight: string [readonly] 
字体的粗细: 数值从 0 到 12,当为当前字体系列设置不存在的字体粗细时,将改为设置最接近的粗细。


textUnderline: DecorationStyle
文本下划线。


textStrikethrough: StrikeThroughStyle
文本删除线。


textBehaviour: TextBehaviour
文本行为, 确定是否自动计算宽或高。


fragments: TextFragment[]
富文本的文本片段。


sharedStyleId: string | undefined
文本资源ID。


sharedStyle: SharedTextStyle | null
文本资源。