Returns a table of wrapped lines for a piece of text, given a line length limit. Newlines are handled correctly. The wrap limit units depend on the pixel density of the font. With the default pixel density, the units correspond to meters when the font is drawn at 1.0 scale.
Arguments
Name
Type
Description
string
string
The text to wrap.
wrap
number
The line length to wrap at.
Returns
Name
Type
Description
lines
table
A table strings, one for each wrapped line (without any color information).
Arguments
Name
Type
Description
strings
table
A table of colored strings, each given as a { color, string } pair. The color can be a Vec3, Vec4, table, or hexcode.
wrap
number
The line length to wrap at.
Returns
Name
Type
Description
lines
table
A table strings, one for each wrapped line (without any color information).