---
name: "TTF_GetTextDirection"
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_GetTextDirection"
---

# TTF\_GetTextDirection(3)

Get the direction to be used for text shaping a text object.

## NAME

TTF\_GetTextDirection - Get the direction to be used for text shaping a text object.

## HEADER FILE

Defined in SDL3\_ttf/SDL\_ttf.h

## SYNOPSIS

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

**TTF\_Direction TTF\_GetTextDirection(TTF\_Text \*text);**

## DESCRIPTION

This defaults to the direction of the font used by the text object.

## FUNCTION PARAMETERS

- *text*

  the text to query.

## RETURN VALUE

( **TTF\_Direction** ) Returns the direction to be used for text shaping.

## THREAD SAFETY

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

## AVAILABILITY

This function is available since SDL\_ttf 3.0.0.
