gre.get_string_size( font, font_size, string, length, width, data )
Calculate the area in pixels which the given string will occupy on the screen.
This call can only be made from the main Lua action execution thread.
Parameters:
string The string to render
font The name of the font to render in
font_size The size of the font to render in
string_length The length of the string to render or 0 for all (optional)
width A clipping width (in pixels) for the string, used to calculate how many characters fit
data A table containing additional options. Valid options are:
["length"] - number of characters to process
["spacing"] - letter spacing parameter
["wrapping"] - boolean to activate wrapping logic
Returns:
A table containing the following entries:
"width" width in pixels of the widest line that will be rendered
"height" total string height in pixels
"n_lines" number of lines text occupies when rendered