1al_draw_glyph(3) al_draw_glyph(3)
2
3
4
6 al_draw_glyph - Allegro 5 API
7
9 #include <allegro5/allegro_font.h>
10
11 void al_draw_glyph(const ALLEGRO_FONT *f, ALLEGRO_COLOR color, float x, float y,
12 int codepoint)
13
15 Draws the glyph that corresponds with codepoint in the given color us‐
16 ing the given font. If font does not have such a glyph, nothing will
17 be drawn.
18
19 To draw a string as left to right horizontal text you will need to use
20 al_get_glyph_advance(3) to determine the position of each glyph. For
21 drawing strings in other directions, such as top to down, use
22 al_get_glyph_dimensions(3) to determine the size and position of each
23 glyph.
24
25 If you have to draw many glyphs at the same time, use al_hold_bit‐
26 map_drawing(3) with true as the parameter, before drawing the glyphs,
27 and then call al_hold_bitmap_drawing(3) again with false as a parameter
28 when done drawing the glyphs to further enhance performance.
29
31 5.1.12
32
34 al_get_glyph_width(3), al_get_glyph_dimensions(3), al_get_glyph_ad‐
35 vance(3).
36
37
38
39Allegro reference manual al_draw_glyph(3)