Appearance
anim-format (runtime format) / AnimText
Interface: AnimText
Properties
| Property | Type | Description |
|---|---|---|
box | object | the text box (local units); text wraps inside |
box.h | number | - |
box.w | number | - |
content | string | plain text (the runs joined, when there are runs) |
font | object | - |
font.align | "left" | "center" | "right" | "justify" | - |
font.bold | boolean | - |
font.color | string | - |
font.family | string | - |
font.italic | boolean | - |
font.size | number | - |
letterSpacing? | number | px between letters, default 0 |
lineHeight? | number | × font size, default DEFAULT_TEXT_LINE_HEIGHT |
multiline? | boolean | false = one line |
overflow? | "visible" | "hidden" | "scroll" | - |
runs? | AnimTextRun[] | rich text; absent = the whole text uses font |
strikethrough? | boolean | - |
textStroke? | object | outline under the fill; color "RRGGBBAA" |
textStroke.color | string | - |
textStroke.width | number | - |
textTransform? | "uppercase" | "lowercase" | "capitalize" | letter case as drawn (CSS text-transform); content keeps the typed text |
underline? | boolean | a line under / through each line (horizontal writing only), base colour |
verticalAlign? | "top" | "middle" | "bottom" | - |
wordWrap? | boolean | false = no wrapping at the box width |
writingMode? | "horizontal" | "vertical" | "vertical" = CJK vertical writing, columns right to left |