getStyle method

int getStyle()

Query a font's current style.

The font styles are a set of bit flags, OR'd together:

  • TTF_STYLE_NORMAL (is zero)
  • TTF_STYLE_BOLD
  • TTF_STYLE_ITALIC
  • TTF_STYLE_UNDERLINE
  • TTF_STYLE_STRIKETHROUGH

\param font the font to query. \returns the current font style, as a set of bit flags.

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

\since This function is available since SDL_ttf 3.0.0.

\sa TTF_SetFontStyle

extern SDL_DECLSPEC int SDLCALL TTF_GetFontStyle(const TTF_Font *font)

Implementation

int getStyle() {
  return ttfGetFontStyle(this);
}