getAscent method

int getAscent()

Query the offset from the baseline to the top of a font.

This is a positive value, relative to the baseline.

\param font the font to query. \returns the font's ascent.

\threadsafety It is safe to call this function from any thread.

\since This function is available since SDL_ttf 3.0.0.

extern SDL_DECLSPEC int SDLCALL TTF_GetFontAscent(const TTF_Font *font)

Implementation

int getAscent() {
  return ttfGetFontAscent(this);
}