1text_length(3)                  Allegro manual                  text_length(3)
2
3
4

NAME

6       text_length  -  Returns  the length of a string in pixels. Allegro game
7       programming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       int text_length(const FONT *f, const char *str);
14

DESCRIPTION

16       Returns the length (in pixels) of a string in the specified font. Exam‐
17       ple:
18
19          int width = text_length(font, "I love spam");
20          ...
21          bmp = create_bitmap(width, height);
22
23

SEE ALSO

25       text_height(3), ex12bit(3), exmidi(3), expat(3), exunicod(3)
26
27
28
29Allegro                          version 4.2.3                  text_length(3)
Impressum