---
name: "TTF_GetFontSize"
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_GetFontSize"
---

# TTF\_GetFontSize(3)

Get the size of a font.

## NAME

TTF\_GetFontSize - Get the size of a font.

## HEADER FILE

Defined in SDL3\_ttf/SDL\_ttf.h

## SYNOPSIS

```
#include "SDL3_ttf/SDL_ttf.h"
```

**float TTF\_GetFontSize(TTF\_Font \*font);**

## FUNCTION PARAMETERS

- *font*

  the font to query.

## RETURN VALUE

Returns the size of the font, or 0.0f on failure; call SDL\_GetError() for more information.

## THREAD SAFETY

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

## AVAILABILITY

This function is available since SDL\_ttf 3.0.0.

## SEE ALSO

**•**(3), [**TTF\_SetFontSize**(3)](/TTF_SetFontSize/3.md), **•**(3), [**TTF\_SetFontSizeDPI**(3)](/TTF_SetFontSizeDPI/3.md)
