String whose size should be returned.
Integer that specifies the font size in pixels. Default is DEFAULT_FONTSIZE.
String that specifies the name of the font family. Default is DEFAULT_FONTFAMILY.
Optional width for text wrapping.
Optional font style.
Returns an Rectangle with the size (width and height in pixels) of the given string. The string may contain HTML markup. Newlines should be converted to
<br>
before calling this method. The caller is responsible for sanitizing the HTML markup.Example: