GetTextSize
From OxeyeWiki
video.getTextSize(text[, font]) | ||
Fetches the width and height of a text string, using the specified font. | ||
Parameter | Expected Type | Description |
text | String | The text you wish to get the size of. |
font | Optional string | Name of the font package you are using, should end with ".fnt". Defaults to "font.fnt". |
Returns | ||
Returns width and height of the text string. |
Example
local w, h = video.getTextSize("Hello World!", "myFont.fnt")