---
name: "TTF_AddFallbackFont"
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_AddFallbackFont"
---

# TTF\_AddFallbackFont(3)

Add a fallback font.

## NAME

TTF\_AddFallbackFont - Add a fallback font.

## HEADER FILE

Defined in SDL3\_ttf/SDL\_ttf.h

## SYNOPSIS

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

**bool TTF\_AddFallbackFont(TTF\_Font \*font, TTF\_Font \*fallback);**

## DESCRIPTION

Add a font that will be used for glyphs that are not in the current font. The fallback font should have the same size and style as the current font.

If there are multiple fallback fonts, they are used in the order added.

This updates any  **TTF\_Text**\
  objects using this font.

## FUNCTION PARAMETERS

- *font*

  the font to modify.

- *fallback*

  the font to add as a fallback.

## RETURN VALUE

Returns true on success or false on failure; call SDL\_GetError() for more information.

## THREAD SAFETY

This function should be called on the thread that created both fonts.

## AVAILABILITY

This function is available since SDL\_ttf 3.0.0.

## SEE ALSO

**•**(3), [**TTF\_ClearFallbackFonts**(3)](/TTF_ClearFallbackFonts/3.md), **•**(3), [**TTF\_RemoveFallbackFont**(3)](/TTF_RemoveFallbackFont/3.md)
