!12297 新增 font variation 接口

Merge pull request !12297 from luhan/font_variation
This commit is contained in:
openharmony_ci 2024-07-09 06:11:22 +00:00 committed by Gitee
commit a39e282072
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -639,6 +639,29 @@ declare namespace text {
value: number;
}
/**
* Describes font variation of text.
* @typedef FontVariation
* @syscap SystemCapability.Graphics.Drawing
* @since 12
*/
interface FontVariation {
/**
* The axis of font variation.
* @type { string } variation axis
* @syscap SystemCapability.Graphics.Drawing
* @since 12
*/
axis: string;
/**
* The value of font variation.
* @type { number } variation value
* @syscap SystemCapability.Graphics.Drawing
* @since 12
*/
value: number;
}
/**
* Describes text style.
* @typedef TextStyle
@ -799,6 +822,14 @@ declare namespace text {
* @since 12
*/
backgroundRect?: RectStyle;
/**
* Text Style available font variations.
* @type { ?Array<FontVariation> } A collection of font variations.
* @syscap SystemCapability.Graphics.Drawing
* @since 12
*/
fontVariations?: Array<FontVariation>;
}
/**
@ -920,7 +951,7 @@ declare namespace text {
heightOverride?: boolean;
/**
* Whether the halfleading is enable.
* Whether the half leading is enable.
* @type { ?boolean } it is boolean type data
* @syscap SystemCapability.Graphics.Drawing
* @since 12