---
name: "TTF_SetFontOutline"
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_SetFontOutline"
---

# TTF\_SetFontOutline(3)

Set a font's current outline.

## NAME

TTF\_SetFontOutline - Set a font's current outline.

## HEADER FILE

Defined in SDL3\_ttf/SDL\_ttf.h

## SYNOPSIS

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

**bool TTF\_SetFontOutline(TTF\_Font \*font, int outline);**

## DESCRIPTION

This uses the font properties

**TTF\_PROP\_FONT\_OUTLINE\_LINE\_CAP\_NUMBER** ,

**TTF\_PROP\_FONT\_OUTLINE\_LINE\_JOIN\_NUMBER** , and

**TTF\_PROP\_FONT\_OUTLINE\_MITER\_LIMIT\_NUMBER** when setting the font outline.

This updates any  **TTF\_Text**\
  objects using this font, and clears already-generated glyphs, if any, from the cache.

## FUNCTION PARAMETERS

- *font*

  the font to set a new outline on.

- *outline*

  positive outline value, 0 to default.

## 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 the font.

## AVAILABILITY

This function is available since SDL\_ttf 3.0.0.

## SEE ALSO

**•**(3), [**TTF\_GetFontOutline**(3)](/TTF_GetFontOutline/3.md)
