---
name: "textprintf_ex"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/textprintf_ex"
---

# textprintf\_ex(3alleg)

Formatted output of a string. Allegro game programming library.

## NAME

textprintf\_ex - Formatted output of a string. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**void textprintf\_ex(BITMAP \*bmp, const FONT \*f, int x, int y,** **int color, int bg, const char \*fmt, ...);**

## DESCRIPTION

Formatted text output, using a printf() style format string. Due to an internal limitation, this function can't be used for extremely long texts. If you happen to reach this limit, you can work around it by using uszprintf() and textout\_ex(), which don't have any. Example:

```
   int player_score;
   ...
   textprintf_ex(screen, font, 10, 10, makecol(255, 100, 200),
                 -1, "Score: %d", player_score);
```

## SEE ALSO

[**font**(3alleg)](/font/3alleg.md), [**textout\_ex**(3alleg)](/textout_ex/3alleg.md), [**textprintf\_centre\_ex**(3alleg)](/textprintf_centre_ex/3alleg.md), [**textprintf\_right\_ex**(3alleg)](/textprintf_right_ex/3alleg.md), [**textprintf\_justify\_ex**(3alleg)](/textprintf_justify_ex/3alleg.md), [**text\_height**(3alleg)](/text_height/3alleg.md), [**text\_length**(3alleg)](/text_length/3alleg.md), [**uszprintf**(3alleg)](/uszprintf/3alleg.md)
