al_load_ttf_font - Man Page

Allegro 5 API

Synopsis

#include <allegro5/allegro_ttf.h>

ALLEGRO_FONT *al_load_ttf_font(char const *filename, int size, int flags)

Description

Loads a TrueType font from a file using the FreeType library. Quoting from the FreeType FAQ this means support for many different font formats:

TrueType, OpenType, Type1, CID, CFF, Windows FON/FNT, X11 PCF, and others

The size parameter determines the size the font will be rendered at, specified in pixels. The standard font size is measured in units per EM, if you instead want to specify the size as the total height of glyphs in pixels, pass it as a negative value.

Note: If you want to display text at multiple sizes, load the font multiple times with different size parameters.

The following flags are supported:

See Also

al_init_ttf_addon(3), al_load_ttf_font_f(3)

Referenced By

al_init_ttf_addon(3), al_load_font(3), al_load_ttf_font_f(3), al_load_ttf_font_stretch(3).

Allegro reference manual