diff --git a/api/@internal/component/ets/text.d.ts b/api/@internal/component/ets/text.d.ts index 7f498aaccebcbe7bd88b3a2158b2a49fd1d0e737..7ae6963ab2e8faa03136ee1e8acf6d0325b30a6a 100644 --- a/api/@internal/component/ets/text.d.ts +++ b/api/@internal/component/ets/text.d.ts @@ -671,6 +671,46 @@ declare class TextAttribute extends CommonMethod { */ lineSpacing(value: LengthMetrics): TextAttribute; + /** + * Set the minimum line height + * + * @param { LengthMetrics } value + * @returns { TextAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 21 + */ + minLineHeight(value: LengthMetrics): TextAttribute; + + /** + * Set the maximum line height + * + * @param { LengthMetrics } value + * @returns { TextAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 21 + */ + maxLineHeight(value: LengthMetrics): TextAttribute; + + /** + * Called when the vertical center mode of the font is set. + * + * @param { number | string | Resource } value + * @param { LineHeightOptions } [options] - Indicates the options of setting line height + * @returns { TextAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 21 + */ + lineHeight(value: number | string | Resource, options?: LineHeightOptions): TextAttribute; + /** * Set font line spacing with options. * diff --git a/api/@internal/component/ets/text_common.d.ts b/api/@internal/component/ets/text_common.d.ts index 2f6b2461aee2a831d85a6da5e056dc9fe22c4250..f642e0243664d5df38bf233b27fa9a79c5456ed4 100644 --- a/api/@internal/component/ets/text_common.d.ts +++ b/api/@internal/component/ets/text_common.d.ts @@ -1998,6 +1998,30 @@ declare interface LineSpacingOptions { onlyBetweenLines?: boolean; } +/** + * Defines the options of setting line height. + * + * @interface LineHeightOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @from + * @atomicservice + * @since 21 + */ +declare interface LineHeightOptions { + /** + * enable the multiply mode of line height setting. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @from + * @atomicservice + * @since 21 + */ + enableMultiply: boolean; +} + /** * Defines the options of max lines. * @interface MaxLinesOptions