From Xojo Documentation

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

New in 2019r2

Supported for all project types and targets.

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


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

Sample Code

The following example gets the font ascent of the text that was drawn with DrawText.

g.DrawingColor = &cff0000
g.IsItalic = True
g.DrawText("Hello world", 10, 10)