Legacy:Font/getStringHeight

From Spherical
< Legacy:Font
Revision as of 22:50, 24 June 2013 by Apollolux (talk | contribs) (filled)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Get the pixel height of word-wrapped text that would be drawn with Font.drawTextBox().

Usage

integer Font.getStringHeight(text, width);


  • text string. The text to calculate the word-wrapped height of
  • width integer. The pixel width of the box in which word-wrapping occurs

Examples

The third example of Font.drawTextBox() contains a useful application of this function.

Notes

  • This function can be used to figure out the right number for the y_offset argument of the Font.drawTextBox() function.

See also

API:Font/navbox