ttfFontAscent function

int ttfFontAscent(
  1. Pointer<TtfFont> font
)

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.

\since This function is available since SDL_ttf 2.0.12.

extern DECLSPEC int SDLCALL TTF_FontAscent(const TTF_Font *font)

Implementation

int ttfFontAscent(Pointer<TtfFont> font) {
  final ttfFontAscentLookupFunction = libSdl2Ttf.lookupFunction<
      Int32 Function(Pointer<TtfFont> font),
      int Function(Pointer<TtfFont> font)>('TTF_FontAscent');
  return ttfFontAscentLookupFunction(font);
}