al_create_builtin_font(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– al_create_builtin_font β€” Allegro 5 API πŸ’–

okay bestie, listen up, this one's from the Allegro 5 API and it's lowkey a lifesaver 🫢

✨ SYNOPSIS ✨

#include <allegro5/allegro_font.h>

ALLEGRO_FONT *al_create_builtin_font(void)

🌸 DESCRIPTION 🌸

So like. This function literally creates a monochrome bitmap font β€” that's 8x8 pixels per character, no cap. tiny little letters. iconic. πŸ’…

Who is this font for, you ask? It's primarily intended for displaying information in environments, or during those early runtime states, where no external font data is available or loaded. e.g. for debugging. it's giving "we have no fonts at home" and honestly that's the whole point πŸŽ€

The builtin font contains the following unicode character ranges:

  • 0x0020 to 0x007F (ASCII)
  • 0x00A1 to 0x00FF (Latin 1)
  • 0x0100 to 0x017F (Extended A)
  • 0x20AC to 0x20AC (euro currency symbol) πŸ’Ά

Returns NULL on an error. (not me getting a NULL back and panicking 😭)

bestie the font memory must be freed the same way as for any other font, using al_destroy_font(3alleg5). do NOT forget. leaking memory is not the vibe. 🚨

⭐ SINCE ⭐

5.0.8, 5.1.3 β€” she's been here a minute, an OG πŸ‘‘


🌈 SEE ALSO 🌈


Allegro reference manual β€” that's the source/version energy for al_create_builtin_font(3alleg5), mwah, go forth and render text before you even have text, fr fr πŸ’œβœ¨

πŸ“¦ where this page comes from