transpose_font(3alleg4)
π transpose_font π
ok so real talk β this is transpose_font from the Allegro manual, aka the Allegro game programming library. and bestie, it's giving font-glow-up energy β¨
π SYNOPSIS π
#include <allegro.h>
int transpose_font(FONT *f, int drange)
π¦ DESCRIPTION π¦
okay so here's the tea β β transpose_font takes every single character in a font and transposes them all, which basically remaps the whole font. like a whole personality transplant for your glyphs, no cap π
example time, because iykyk:
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);
see how that works? you pull out just the capitals with extract_font_range(myfont, 'A', 'Z'), then transpose_font(capitals, 'a'-'A') shifts everything over so those capital glyphs get used for the lowercase letters a-z instead. iconic behaviour honestly π
β RETURN VALUE β
- returns
0when it ate π (success) - returns
-1when it did not eat π (failure)
π SEE ALSO π
get_font_range_begin(3alleg4)get_font_range_end(3alleg4)merge_fonts(3alleg4)extract_font_range(3alleg4)
k bye bestie, go transpose some fonts π this was transpose_font(3alleg4) from the Allegro manual, version 4.4.3 β mwah, drink water, and remember that even fonts deserve a fresh start π«Άβ¨
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms