Optional
alignAlignment for multiline text, does not affect single line text
Optional
breakWhether to allow line breaks within words. Requires wordWrap to be true.
Optional
dropDrop shadow configuration for the text. Can be boolean or a TextDropShadow object.
Optional
fillFill style for the text. Can be a color, gradient, or pattern.
Optional
filtersArray of filters to apply to the text.
These filters will be applied to the text as it is created, resulting in faster rendering for static text compared to applying the filter directly to the text object (which would be applied at run time).
Optional
fontFont family or families to use. Can be single name or array of fallbacks.
Optional
fontFont size in pixels or as string.
Equivalents are '26px','20pt','160%' or '1.6em')
Optional
fontFont style (normal, italic, oblique).
Optional
fontFont variant (normal, small-caps).
Optional
fontFont weight (normal, bold, bolder, lighter, 100-900).
Optional
leadingThe height of the line, a number that represents the vertical space that a letter uses.
Optional
letterThe amount of spacing between letters, default is 0
Optional
lineThe line height, a number that represents the vertical space that a letter uses
Optional
paddingPadding 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.
Optional
strokeStroke style for text outline.
Optional
textVertical alignment baseline.
Optional
trimWhether to trim transparent edges.
This is an expensive operation and should only be used when necessary.
Optional
whiteHow to handle whitespace.
It needs wordWrap to be set to true for this to have an effect.
Optional
wordIndicates if word wrap should be used
Optional
wordThe width at which text will wrap, it needs wordWrap to be set to true
Constructor options used for
TextStyle
instances. Defines the visual appearance and layout of text.Example
See
TextStyle For the main style class