GetTextSize

From OxeyeWiki

Jump to: navigation, search

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.

Daisymoon Video Lib

Example

   local w, h = video.getTextSize("Hello World!", "myFont.fnt")
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox