From Xojo Documentation
Gets the height of a line of text drawn with the current font.
Used to calculate the height of a line of text passed (given the wrap width passed) drawn with the current font.
TextHeight is calculated as the maximum height for the font itself and not the actual height of the text. For example, with "a" vs. "A", both return the same TextHeight even though "A" has a greater height than "a".
g.FontUnit = FontUnits.Points
g.FontSize = 32
Var height As Double
height = g.TextHeight("Hello world", 150)
This example reports the TextHeight of the current text.
g.Italic = True
g.DrawText("Hello world", 10, 10)