...
...
...
...
text_leading(#pixels)
sets the vertical space between lines of text. Will be reset by subsequent calls to text_size()
.
text_ascent()
returns the height of the font above the baseline.
text_descent()
returns the height of the font below the baseline.
Adding the two will give you the total height of the current font (at its current size).
text_width(string)
returns the width of the string in the current font and size.
Here is an example that uses font metrics to draw a box around some text.