DOKK / manpages / debian 13 / libsdl3-ttf-doc / TTF_GetFontWeight.3.en
TTF_GetFontWeight(3) SDL_ttf3 FUNCTIONS TTF_GetFontWeight(3)

TTF_GetFontWeight - Query a font's weight, in terms of the lightness/heaviness of the strokes.

Defined in SDL3_ttf/SDL_ttf.h

#include "SDL3_ttf/SDL_ttf.h"
int TTF_GetFontWeight(const TTF_Font *font);


#define TTF_FONT_WEIGHT_THIN        100 /**< Thin (100) named font weight value */
#define TTF_FONT_WEIGHT_EXTRA_LIGHT 200 /**< ExtraLight (200) named font weight value */
#define TTF_FONT_WEIGHT_LIGHT       300 /**< Light (300) named font weight value */
#define TTF_FONT_WEIGHT_NORMAL      400 /**< Normal (400) named font weight value */
#define TTF_FONT_WEIGHT_MEDIUM      500 /**< Medium (500) named font weight value */
#define TTF_FONT_WEIGHT_SEMI_BOLD   600 /**< SemiBold (600) named font weight value */
#define TTF_FONT_WEIGHT_BOLD        700 /**< Bold (700) named font weight value */
#define TTF_FONT_WEIGHT_EXTRA_BOLD  800 /**< ExtraBold (800) named font weight value */
#define TTF_FONT_WEIGHT_BLACK       900 /**< Black (900) named font weight value */
#define TTF_FONT_WEIGHT_EXTRA_BLACK 950 /**< ExtraBlack (950) named font weight value */

the font to query.

Returns the font's current weight.

This function should be called on the thread that created the font.

This function is available since SDL_ttf 3.2.2.

SDL_ttf 3.2.2 SDL_ttf