Font:getWidth

Edit

Returns the maximum width of a piece of text. This function does not perform wrapping but does respect newlines in the text.



Arguments

NameTypeDescription
stringstring The text to measure.

Returns

NameTypeDescription
widthnumber The maximum width of the text.

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.

Returns

NameTypeDescription
widthnumber The maximum width of the text.

See also