diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-span.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-span.md index b187df205a98398277c003fb42f1f2fbbc3d21db..1efe13048c4d18031dd46efbae7fe954b285dd89 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-span.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-span.md @@ -36,6 +36,7 @@ Span(value: string | Resource) | decoration | {
type: [TextDecorationType](ts-appendix-enums.md#textdecorationtype),
color?: [ResourceColor](ts-types.md#resourcecolor)
} | 设置文本装饰线样式及其颜色。
默认值:{
type: TextDecorationType.None
color:Color.Black
}
从API version 9开始,该接口支持在ArkTS卡片中使用。| | letterSpacing | number \| string | 设置文本字符间距。取值小于0,字符聚集重叠,取值大于0且随着数值变大,字符间距越来越大,稀疏分布。
从API version 9开始,该接口支持在ArkTS卡片中使用。 | | textCase | [TextCase](ts-appendix-enums.md#textcase) | 设置文本大小写。
默认值:TextCase.Normal
从API version 9开始,该接口支持在ArkTS卡片中使用。 | +| font10+ | [Font](ts-types.md#font) | 设置文本样式。包括字体大小、字体粗细、字体族和字体风格。| ## 事件 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-text.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-text.md index 2783c0acf161f5da292bce06987bc9a23e477de9..9e659aabb6d40fc0657b7c7caf572072d0cf8056 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-text.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-text.md @@ -45,6 +45,7 @@ Text(content?: string | Resource) | textShadow10+ | [ShadowOptions](ts-universal-attributes-image-effect.md#shadowoptions对象说明) | 设置文字阴影效果。 | | heightAdaptivePolicy10+ | [TextHeightAdaptivePolicy](ts-appendix-enums.md#textheightadaptivepolicy10) | 设置文本自适应高度的方式。
默认值:TextHeightAdaptivePolicy.MAX_LINES_FIRST。
**说明:**
当设置为TextHeightAdaptivePolicy.MAX_LINES_FIRST时,优先使用`maxLines`属性来调整文本高度。如果使用`maxLines`属性的布局大小超过了布局约束,则尝试在`minFontSize`和`maxFontSize`的范围内缩小字体以显示更多文本。
当设置为TextHeightAdaptivePolicy.MIN_FONT_SIZE_FIRST时,优先使用`minFontSize`属性来调整文本高度。如果使用`minFontSize`属性可以将文本布局在一行中,则尝试在`minFontSize`和`maxFontSize`的范围内增大字体并使用最大可能的字体大小。
当设置为TextHeightAdaptivePolicy.LAYOUT_CONSTRAINT_FIRST时,优先使用布局约束来调整文本高度。如果布局大小超过布局约束,则尝试在`minFontSize`和`maxFontSize`的范围内缩小字体以满足布局约束。如果将字体大小缩小到`minFontSize`后,布局大小仍然超过布局约束,则删除超过布局约束的行。| | textIndent10+ | number \| string | 设置首行文本缩进,默认值0。 | +| font10+ | [Font](ts-types.md#font) | 设置文本样式。包括字体大小、字体粗细、字体族和字体风格。 | > **说明:** >