GetTextSize
From OxeyeWiki
(Difference between revisions)
Jeb (Talk | contribs)
(Created page with '{{VideoMethod | video.getTextSize(text[, font]) | Fetches the width and height of a text string, using the specified font. | {{MethodParam|text|String|The text you wish to get th...')
(Created page with '{{VideoMethod | video.getTextSize(text[, font]) | Fetches the width and height of a text string, using the specified font. | {{MethodParam|text|String|The text you wish to get th...')
Latest revision as of 20:24, 27 December 2009
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")