---
name: "TTF_GetFontWeight"
section: "3"
platform: "linux"
package: "libsdl3-ttf-doc"
version: "3.2.2+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/TTF_GetFontWeight"
---

# TTF\_GetFontWeight(3)

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

## NAME

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

## HEADER FILE

Defined in SDL3\_ttf/SDL\_ttf.h

## SYNOPSIS

```
#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 \*/**

## FUNCTION PARAMETERS

- *font*

  the font to query.

## RETURN VALUE

Returns the font's current weight.

## THREAD SAFETY

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

## AVAILABILITY

This function is available since SDL\_ttf 3.2.2.
