---
name: "al_draw_glyph"
section: "3alleg5"
platform: "linux"
package: "allegro5-doc"
version: "2:5.2.10.1+dfsg-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/al_draw_glyph/3alleg5"
---

# al\_draw\_glyph(3alleg5)

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(3alleg5) to determine the position of each glyph. For drawing strings in other directions, such as top to down, use al\_get\_glyph\_dimensions(3alleg5) 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(3alleg5) with true as the parameter, before drawing the glyphs, and then call al\_hold\_bitmap\_drawing(3alleg5) 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(3alleg5), al\_get\_glyph\_dimensions(3alleg5), al\_get\_glyph\_advance(3alleg5).
