Get font max ascent (y above origin). Get the offset from the baseline to the top of the font This is a positive value, relative to the baseline.
The maximum pixel ascent of all glyphs in the font.
It could be used when drawing an individual glyph relative to a top point, by combining it with the glyph's maxy metric to resolve the top of the rectangle used when blitting the glyph on the screen.
rect.y = top + TTF_FontAscent(font) - glyph_metric.maxy;
NOTE: Passing a NULL font into this function will cause a segfault.
Binds to C-function in SDL_ttf.h
int TTF_FontAscent(TTF_Font *font)
// get the loaded font's max ascent //TTF_Font *font; printf("The font ascent is: %d\n", TTF_FontAscent(font));
SdlTtf Class | Tao.Sdl Namespace | TTF_FontHeight | TTF_FontDescent | TTF_FontLineSkip