---
name: "TTF_DrawRendererText"
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_DrawRendererText"
---

# TTF\_DrawRendererText(3)

Draw text to an SDL renderer.

## NAME

TTF\_DrawRendererText - Draw text to an SDL renderer.

## HEADER FILE

Defined in SDL3\_ttf/SDL\_ttf.h

## SYNOPSIS

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

**bool TTF\_DrawRendererText(TTF\_Text \*text, float x, float y);**

## DESCRIPTION

**text** must have been created using a  **TTF\_TextEngine**\
  from

**TTF\_CreateRendererTextEngine** (), and will draw using the renderer passed to that function.

## FUNCTION PARAMETERS

- *text*

  the text to draw.

- *x*

  the x coordinate in pixels, positive from the left edge towards the right.

- *y*

  the y coordinate in pixels, positive from the top edge towards the bottom.

## 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 text.

## AVAILABILITY

This function is available since SDL\_ttf 3.0.0.

## SEE ALSO

**•**(3), [**TTF\_CreateRendererTextEngine**(3)](/TTF_CreateRendererTextEngine/3.md), **•**(3), [**TTF\_CreateText**(3)](/TTF_CreateText/3.md)
