logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Availability

       This function is available since SDL_ttf 3.2.2.

SDL_ttf                                           SDL_ttf 3.2.2                             TTF_GetFontWeight(3)

Function Parameters

font   the font to query.

Header File

       Defined in SDL3_ttf/SDL_ttf.h

Name

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

Return Value

       Returns the font's current weight.

Synopsis

#include"SDL3_ttf/SDL_ttf.h"intTTF_GetFontWeight(constTTF_Font*font);#defineTTF_FONT_WEIGHT_THIN100/**<Thin(100)namedfontweightvalue*/#defineTTF_FONT_WEIGHT_EXTRA_LIGHT200/**<ExtraLight(200)namedfontweightvalue*/#defineTTF_FONT_WEIGHT_LIGHT300/**<Light(300)namedfontweightvalue*/#defineTTF_FONT_WEIGHT_NORMAL400/**<Normal(400)namedfontweightvalue*/#defineTTF_FONT_WEIGHT_MEDIUM500/**<Medium(500)namedfontweightvalue*/#defineTTF_FONT_WEIGHT_SEMI_BOLD600/**<SemiBold(600)namedfontweightvalue*/#defineTTF_FONT_WEIGHT_BOLD700/**<Bold(700)namedfontweightvalue*/#defineTTF_FONT_WEIGHT_EXTRA_BOLD800/**<ExtraBold(800)namedfontweightvalue*/#defineTTF_FONT_WEIGHT_BLACK900/**<Black(900)namedfontweightvalue*/#defineTTF_FONT_WEIGHT_EXTRA_BLACK950/**<ExtraBlack(950)namedfontweightvalue*/

Thread Safety

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

See Also