SHIP:Sail:textHeight

From Serious Documentation
Jump to: navigation, search
Function Returns Introduced Description
textHeight Integer v5.1.0 Returns the vertical pixel height of a string.

See Also:

Prototype

Integer textHeight(String s);

Parameters/Return Value

Parameter Data Type Description
s String String to measure
Return Integer number of vertical pixels in the string

Detailed Description

The textHeight function returns the number of vertical pixels in a string. Font size and type can vary the result.

Examples

Example Result Notes
textHeight("hello");
40 20 pt font
textHeight("hello");
64 32 pt font
textHeight("");
0