Text Attr defined for particular fragments of the text (text ranges).
Property | Type | Required |
---|---|---|
class | const | Required |
length | integer | Optional |
borders | Array<Border> | Optional |
fills | Array<Fill> | Optional |
fillUseType | integer | Optional |
horizontalAlignment | integer | Required |
name | string | Optional |
subFamilyName | string | Optional |
size | number | Required |
kerning | boolean | Required |
letterSpacing | number | Required |
lineSpace | number | Required |
underline | integer | Required |
linethrough | boolean | Required |
bold | boolean | Optional |
italic | boolean | Optional |
lettertransform | integer | Required |
baselineShift | number | Required |
baseline | integer | Required |
horizontalScale | number | Required |
verticalScale | number | Required |
proportionalSpacing | number | Required |
rotate | number | Required |
textParagraph | TextParagraph | Required |
Description
no description
Type
const
Value
constant: the value of this property must be equal to:
json"fontAttr"
Description
The number of characters(utf-8) that the current attribute acts on. If this item omit, it means current attribute acts on all remainder characters. note: If a utf8 character is 4 bytes, its length counts as 2 If a utf8 character is 1 ~ 3 bytes, its length counts as 1
Type
integer
Description
An array containing the border styles of the character. Take precedence over the corresponding property of the object. If the entry is not exists, the corresponding property of the object itself is used.
Type
Array<Border>
Description
no description
Type
integer
Value
enum: the value of this property must be equal to one of the following values:
Value | Explanation |
---|---|
0 | fills take precedence over the corresponding property of the object, unless fills not exists.(default value) |
1 | The corresponding property of the object take precedence over fills. When style.fills only has one valid solid color object and fills only has one valid solid color object, the opacity of the two solid color objects is added to the solid color object of style.fills. |
Description
Horizontal alignment of the text.
Type
integer
Value
enum: the value of this property must be equal to one of the following values:
Value | Explanation |
---|---|
0 | Left |
1 | Right |
2 | Centered |
3 | Justified |
4 | Natural |
Description
Common name of font. The font name may contain subfamily, in which case the subFamilyName will not appear. If this item does not exist, the font name cannot be obtained.
Type
string
Description
Text underline type.
Type
integer
Value
enum: the value of this property must be equal to one of the following values:
Value | Explanation |
---|---|
0 | none |
1 | single line |
2 | double line |
Description
Describes if the text is bold. If missing the information is not known.
Type
boolean
Description
Describes if the text is italic. If missing the information is not known.
Type
boolean
Description
no description
Type
integer
Value
enum: the value of this property must be equal to one of the following values:
Value | Explanation |
---|---|
0 | do nothing. |
1 | open smallcaps. |
2 | open uppercase. |
3 | open lowercase. |
4 | force smallcaps. |
5 | title |
Description
Describes baseline's position type.
Type
integer
Value
enum: the value of this property must be equal to one of the following values:
Value | Explanation |
---|---|
0 | normal |
1 | superScript |
2 | subScript |
Description
Describes the horizontal scaling value of text. Value example: 1: not scale 1.75: 175% 2: 200% 0.5: 50%
Type
number
Description
Describes the vertical scaling value of text. Value example reference horizontalScale.
Type
number
Description
Describes the proportional spacing of text. Value example: 1: 100% 0.5: 50% 0: 0%
Type
number
Value
maximum: the value of this number must smaller than or equal to: 1
minimum: the value of this number must greater than or equal to: 0
Description
Describes the value of text rotation(in degree).
Type
number
Value
maximum: the value of this number must smaller than or equal to: 180
minimum: the value of this number must greater than or equal to: -180