Font:getLines

Edit

Returns a table of wrapped lines for a piece of text, given a line length limit.

By default the units for limit are in meters. If text is being drawn with scale applied, make sure the scale is also applied to the limit.



Arguments

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

Returns

NameTypeDescription
lines{string} A table of strings, one for each wrapped line.

Arguments

NameTypeDescription
stringstable A table of multicolor strings to wrap. The colors aren't used for anything, this just exists to match Pass:text.
wrapnumber The line length to wrap at.

Returns

NameTypeDescription
lines{string} A table of strings, one for each wrapped line.

Notes

The font's pixel density is incorporated into the limit. So if the font's pixel density is changed to 1 (changing the font's units to pixels), the limit will be in pixels as well.

See also