String whose size should be returned.
Integer that specifies the font size in pixels. Default is Constants#DEFAULT_FONTSIZE.
String that specifies the name of the font family. Default is Constants#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
before calling this method. The caller is responsible for sanitizing the HTML markup.
Example: