---
name: "al_load_font"
section: "3alleg5"
platform: "linux"
package: "allegro5-doc"
version: "2:5.2.10.1+dfsg-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/al_load_font/3alleg5"
---

# al\_load\_font(3alleg5)

Allegro 5 API

## NAME

al\_load\_font - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro_font.h>
  ALLEGRO_FONT *al_load_font(char const *filename, int size, int flags)
  ```

## DESCRIPTION

Loads a font from disk. This will use al\_load\_bitmap\_font\_flags(3alleg5) if you pass the name of a known bitmap format, or else al\_load\_ttf\_font(3alleg5).

The flags parameter is passed through to either of those functions. Bitmap and TTF fonts are also affected by the current \[bitmap flags\]al\_set\_new\_bitmap\_flags(3alleg5) at the time the font is loaded.

## SEE ALSO

al\_destroy\_font(3alleg5), al\_init\_font\_addon(3alleg5), al\_register\_font\_loader(3alleg5), al\_load\_bitmap\_font\_flags(3alleg5), al\_load\_ttf\_font(3alleg5)
