transpose_font(3)
β¨ transpose_font(3) β¨
okay bestie, this page is straight from the Allegro manual, and we're about to make font remapping make sense. transpose_font does exactly what it says: it transposes all characters in a font. like, every character gets moved around so the font is effectively remapped. it's giving font glow-up. π
πΈ NAME πΈ
transpose_font β Transposes all characters in a font. Part of the Allegro game programming library. π
π¦ SYNOPSIS π¦
#include <allegro.h>
int transpose_font(FONT *f, int drange)
π DESCRIPTION π
so this function transposes all characters in a font, effectively remapping the font. no cap. example:
FONT *myfont;
FONT *capitals;
...
/* Create a font of only capital letters */
capitals = extract_font_range(myfont, 'A', 'Z');
/* Now transpose the characters in the font so that they will be used */
/* for the lower case letters a-z */
transpose_font(capitals, 'a'-'A');
textout_ex(screen, capitals, "allcaps",
100, 100, makecol(255,255,255), 0);
like, you pull out just the capitals with extract_font_range(myfont, 'A', 'Z'), then transpose_font(capitals, 'a'-'A') makes those capital glyphs get used for the lowercase letters a-z, and then textout_ex drops "allcaps" on screen. iconic. β¨
π RETURN VALUE π
Returns 0 on success, -1 on failure. simple as that. π«Ά
π₯ SEE ALSO π₯
okay that's the whole vibe. from the Allegro manual, version 4.4.3. stay slay, bestie. π β¨
π¦ where this page comes from
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms