al_draw_glyph(3)
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 π
al_get_glyph_width(3)β go read her too.al_get_glyph_dimensions(3)β also essential.al_get_glyph_advance(3)β and this queen.
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