OptionalalignAlignment for multiline text, does not affect single line text
OptionalbreakWhether to allow line breaks within words. Requires wordWrap to be true.
Optional AdvancedcssList of CSS style overrides to apply to the HTML text. These styles are added after the built-in styles and can override any default styling.
OptionaldropDrop shadow configuration for the text. Can be boolean or a TextDropShadow object.
OptionalfillFill style for the text. Can be a color, gradient, or pattern.
OptionalfontFont family or families to use. Can be single name or array of fallbacks.
OptionalfontFont size in pixels or as string.
Equivalents are '26px','20pt','160%' or '1.6em')
OptionalfontFont style (normal, italic, oblique).
OptionalfontFont variant (normal, small-caps).
OptionalfontFont weight (normal, bold, bolder, lighter, 100-900).
OptionalletterThe amount of spacing between letters, default is 0
OptionallineThe line height, a number that represents the vertical space that a letter uses
OptionalpaddingPadding around the text.
Occasionally some fonts are cropped. Adding some padding will prevent this from happening by adding padding to all sides of the text.
OptionalstrokeStroke style for text outline.
OptionaltagCustom styles to apply to specific HTML tags. Allows for consistent styling of custom elements without CSS overrides.
OptionalwhiteHow to handle whitespace.
It needs wordWrap to be set to true for this to have an effect.
OptionalwordIndicates if word wrap should be used
OptionalwordThe width at which text will wrap, it needs wordWrap to be set to true
Options for HTML text style, extends standard text styling with HTML-specific capabilities. Omits certain base text properties that don't apply to HTML rendering.
Example