al_draw_glyph(3)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in arch rolling

Hiii bestie πŸ’– this is al_draw_glyph(3), living its best life in the Library Functions Manual. She’s an Allegro 5 API girlie and she draws exactly one glyph at a time, no cap.

🌸 NAME 🌸

al_draw_glyph β€” Allegro 5 API. One glyph. One vibe. Periodt. ✨

✨ SYNOPSIS ✨

#include <allegro5/allegro_font.h>

void al_draw_glyph(const ALLEGRO_FONT *f, ALLEGRO_COLOR color, float x, float y,
   int codepoint)

πŸ’… DESCRIPTION πŸ’…

Okay so al_draw_glyph draws the glyph that corresponds with codepoint, in the given color, using the given font f. If the font does not have such a glyph, nothing will be drawn β€” literally nothing, not even a little sparkle. πŸ’€

To draw a string as left to right horizontal text, you will need to use al_get_glyph_advance(3) to determine the position of each glyph. For drawing strings in other directions, such as top to down, use al_get_glyph_dimensions(3) to determine the size and position of each glyph. πŸ¦‹

If you have to draw many glyphs at the same time, use al_hold_bitmap_drawing(3) with true as the parameter, before drawing the glyphs, and then call al_hold_bitmap_drawing(3) again with false as the parameter when done drawing the glyphs to further enhance performance. It’s giving β€œbatch my glyphs, bestie” energy, and I’m obsessed. πŸ”₯

⭐ SINCE ⭐

5.1.12 β€” iconic since then, fr fr. πŸ’–

πŸŽ€ SEE ALSO πŸŽ€

Byeee πŸ’œ from the Allegro reference manual β€” al_draw_glyph(3), since 5.1.12, and the footer has no date line to report, so that’s the whole tea. 🫢

πŸ“¦ where this page comes from
  • arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms