make_trans_font(3alleg4)
β¨ NAME β¨
make_trans_font β makes a font use transparency, bestie. it's part of the Allegro game programming library π
π SYNOPSIS π
#include <allegro.h>
void make_trans_font(FONT *f);
π DESCRIPTION π
okay so this function converts a font to use transparency for drawing. that's the whole vibe. what that actually means: every single glyph in the font gets drawn with draw_trans_sprite, so you can use the same blenders you'd use with draw_trans_sprite to draw the font. no cap π«Ά
one super common use of this? loading a bitmap font that has an alpha channel, and then getting anti-aliased text output by using Allegro's alpha blender. it's giving β¨smooth lettersβ¨, fr fr.
here's an example of how to do exactly that:
FONT *f = load_font("alphafont.tga", NULL, NULL);
make_trans_font(f);
set_alpha_blender();
textprintf_centre_ex(screen, f, 320, 240, -1, -1, "Anti-aliased Font!");
likeβ¦ look at that. iconic behavior. π
πΈ SEE ALSO πΈ
and that's the tea, bestie π this was Allegro, version 4.4.3, and it's all about make_trans_font(3alleg4). go make your fonts transparent, you absolute main character ππ¦β
π¦ 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