Difference between revisions of "Font:getWidth"

(See Also)
 
Line 3: Line 3:
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
width = Font:getWidth( text )
+
width = font:getWidth( text )
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===

Latest revision as of 16:39, 26 March 2021

Determines the maximum width (accounting for newlines) taken by the given string.

Function

Synopsis

width = font:getWidth( text )

Arguments

string text
A string.

Returns

number width
The width of the text.

See Also


Other Languages