1al_load_ttf_font(3) al_load_ttf_font(3)
2
3
4
6 al_load_ttf_font - Allegro 5 API
7
9 #include <allegro5/allegro_ttf.h>
10
11 ALLEGRO_FONT *al_load_ttf_font(char const *filename, int size, int flags)
12
14 Loads a TrueType font from a file using the FreeType library. Quoting
15 from the FreeType FAQ this means support for many different font for‐
16 mats:
17
18 TrueType, OpenType, Type1, CID, CFF, Windows FON/FNT, X11 PCF, and oth‐
19 ers
20
21 The size parameter determines the size the font will be rendered at,
22 specified in pixels. The standard font size is measured in units per
23 EM, if you instead want to specify the size as the total height of
24 glyphs in pixels, pass it as a negative value.
25
26 Note: If you want to display text at multiple sizes, load the
27 font multiple times with different size parameters.
28
29 The following flags are supported:
30
31 · ALLEGRO_TTF_NO_KERNING - Do not use any kerning even if the font file
32 supports it.
33
34 · ALLEGRO_TTF_MONOCHROME - Load as a monochrome font (which means no
35 anti-aliasing of the font is done).
36
37 · ALLEGRO_TTF_NO_AUTOHINT - Disable the Auto Hinter which is enabled by
38 default in newer versions of FreeType. Since: 5.0.6, 5.1.2
39
41 al_init_ttf_addon(3), al_load_ttf_font_f(3)
42
43
44
45Allegro reference manual al_load_ttf_font(3)