Graphics.TextAscent

From Xojo Documentation

Read-Only Property (As Double )
DoubleValue = aGraphics.TextAscent

Supported for all project types and targets.

Returns the ascent of a line of text drawn with the current font.

Notes

TextAscent is the height of the tallest font letter above the font baseline.

Sample Code

The following example gets the textascent of the text that was drawn with DrawString.

g.ForeColor = &cff0000
g.Italic = True
g.DrawString("Hello world", 10, 10)
MsgBox(Str(g.TextAscent))