DrawTextOpt: RenderProps & The text to render.
font?: string | FontData | Asset | BitmapFontData | Asset
The name of font to use.
size?: number
The size of text (the height of each character).
align?: TextAlign
Text alignment (default "left")
since
v3000.0
The maximum width. Will wrap word around if exceed.
The gap between each line (only available for bitmap fonts).
since
v2000.2
The gap between each character (only available for bitmap fonts).
since
v2000.2
anchor?: Anchor | Vec2
The anchor point, or the pivot point. Default to "topleft".
transform?: CharTransform | CharTransformFunc
Transform the pos, scale, rotation or color for each character based on the index or char (only available for bitmap fonts).
since
v2000.1
styles?: Record<string, CharTransform | CharTransformFunc>
Stylesheet for styled chunks, in the syntax of "this is a [stylename]styled[/stylename] word" (only available for bitmap fonts).
since
v2000.2
If true, any (whitespace) indent on the first line of the paragraph
will be copied to all of the lines for those parts that text-wrap.
How the text should look like.
group
Draw