---
name: "al_draw_glyph"
section: "3"
platform: "linux"
package: "allegro"
version: "5.2.11.3-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/al_draw_glyph"
---

# al\_draw\_glyph(3)

Allegro 5 API

## NAME

al\_draw\_glyph - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro_font.h>
  void al_draw_glyph(const ALLEGRO_FONT *f, ALLEGRO_COLOR color, float x, float y,
     int codepoint)
  ```

## DESCRIPTION

Draws the glyph that corresponds with `codepoint` in the given `color` using the given `font`. If `font` does not have such a glyph, nothing will be drawn.

To draw a string as left to right horizontal text you will need to use [al\_get\_glyph\_advance(3)](/al_get_glyph_advance/3.md) to determine the position of each glyph. For drawing strings in other directions, such as top to down, use [al\_get\_glyph\_dimensions(3)](/al_get_glyph_dimensions/3.md) 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)](/al_hold_bitmap_drawing/3.md) with true as the parameter, before drawing the glyphs, and then call [al\_hold\_bitmap\_drawing(3)](/al_hold_bitmap_drawing/3.md) again with false as a parameter when done drawing the glyphs to further enhance performance.

## SINCE

5\.1.12

## SEE ALSO

[al\_get\_glyph\_width(3)](/al_get_glyph_width/3.md), [al\_get\_glyph\_dimensions(3)](/al_get_glyph_dimensions/3.md), [al\_get\_glyph\_advance(3)](/al_get_glyph_advance/3.md).
