OptionalalignAlignment for multiline text, does not affect single line text
OptionalbreakWhether to allow line breaks within words. Requires wordWrap to be true.
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.
OptionalfiltersArray 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).
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).
OptionalleadingThe height of the line, a number that represents the vertical space that a letter uses.
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.
OptionaltextVertical alignment baseline.
OptionaltrimWhether to trim transparent edges.
This is an expensive operation and should only be used when necessary.
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
Constructor options used for
TextStyleinstances. Defines the visual appearance and layout of text.Example
See
TextStyle For the main style class