ALLEGRO_FONT(3alleg5)

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

πŸ’– ALLEGRO_FONT πŸ’–

okay so bestie, welcome to the Allegro 5 API ✨ this one lives in section 3 of the allegro5 manual, and it's literally just the font glow-up page πŸŽ€


✨ NAME ✨

ALLEGRO_FONT β€” the Allegro 5 API, but make it fonts πŸ’…


🌸 SYNOPSIS 🌸

no cap, here's the whole thing:

#include <allegro5/allegro_font.h>

typedef struct ALLEGRO_FONT ALLEGRO_FONT;

πŸ¦‹ DESCRIPTION πŸ¦‹

so ALLEGRO_FONT is a handle β€” like, a lil reference that identifies any kind of font. any kind. it's giving versatility πŸ‘‘

usually you're gonna create it with al_load_font(3alleg5), which is the main character here, and it supports loading all kinds of TrueType fonts that the FreeType library supports. iconic behavior fr fr πŸ”₯

but bestie, plot twist 🫒 β€” if you instead pass the filename of a bitmap file, it gets loaded with al_load_bitmap(3alleg5), and then a font in Allegro's bitmap font format gets created from it with al_grab_font_from_bitmap(3alleg5). the way that it just handles both paths for you?? obsessed πŸ˜­πŸ’–

so like, TrueType filename β†’ al_load_font(3alleg5) does its thing. Bitmap filename β†’ al_load_bitmap(3alleg5) + al_grab_font_from_bitmap(3alleg5). same function, two vibes. slay.

okay that's the whole page, periodt πŸ’…βœ¨ this came to you straight from the Allegro reference manual, ALLEGRO_FONT(3alleg5) β€” go forth and render some text, bestie πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from