DrawTextOpt
: RenderProps & {text
: stringThe text to render.
font
?: string | FontData | Asset<FontData> | BitmapFontData | Asset<BitmapFontData>The name of font to use.
size
?: numberThe size of text (the height of each character).
align
?: TextAlignText alignment (default "left")
since
v3000.0
width
?: numberThe maximum width. Will wrap word around if exceed.
lineSpacing
?: numberThe gap between each line (only available for bitmap fonts).
since
v2000.2
letterSpacing
?: numberThe gap between each character (only available for bitmap fonts).
since
v2000.2
anchor
?: Anchor | Vec2The anchor point, or the pivot point. Default to "topleft".
transform
?: CharTransform | CharTransformFuncTransform 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
indentAll
?: booleanIf 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