mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2025-03-06 00:07:43 +00:00
!12297 新增 font variation 接口
Merge pull request !12297 from luhan/font_variation
This commit is contained in:
commit
a39e282072
33
api/@ohos.graphics.text.d.ts
vendored
33
api/@ohos.graphics.text.d.ts
vendored
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user