Font:getLines

Edit

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

NameTypeDescription
stringstring The text to wrap.
wrapnumber The line length to wrap at.

Returns

NameTypeDescription
linestable A table strings, one for each wrapped line (without any color information).

Arguments

NameTypeDescription
stringstable A table of colored strings, each given as a { color, string } pair. The color can be a Vec3, Vec4, table, or hexcode.
wrapnumber The line length to wrap at.

Returns

NameTypeDescription
linestable A table strings, one for each wrapped line (without any color information).

See also