---
name: "TTF_CopyFont"
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_CopyFont"
---

# TTF\_CopyFont(3)

Create a copy of an existing font.

## NAME

TTF\_CopyFont - Create a copy of an existing font.

## HEADER FILE

Defined in SDL3\_ttf/SDL\_ttf.h

## SYNOPSIS

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

**TTF\_Font \* TTF\_CopyFont(TTF\_Font \*existing\_font);**

## DESCRIPTION

The copy will be distinct from the original, but will share the font file and have the same size and style as the original.

When done with the returned  **TTF\_Font** , use

**TTF\_CloseFont** () to dispose of it.

## FUNCTION PARAMETERS

- *existing\_font*

  the font to copy.

## RETURN VALUE

( **TTF\_Font**\
  \*) Returns a valid  **TTF\_Font** , or NULL on failure; call SDL\_GetError() for more information.

## THREAD SAFETY

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

## AVAILABILITY

This function is available since SDL\_ttf 3.0.0.

## SEE ALSO

**•**(3), [**TTF\_CloseFont**(3)](/TTF_CloseFont/3.md)
