Skip to content

Commit c2e9a25

Browse files
author
Trent Gamblin
committed
Add kerning to al_get_glyph example
1 parent 5ec1350 commit c2e9a25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/ex_ttf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ static void render(void)
9090
int cp = ustr_at(dimension_label, index);
9191
ALLEGRO_GLYPH g;
9292
if (al_get_glyph(ex.f2, prev_cp, cp, &g)) {
93-
al_draw_tinted_bitmap_region(g.bitmap, black, g.x, g.y, g.w, g.h, x + 10 + g.offset_x, y + g.offset_y, 0);
93+
al_draw_tinted_bitmap_region(g.bitmap, black, g.x, g.y, g.w, g.h, x + 10 + g.kerning + g.offset_x, y + g.offset_y, 0);
9494
x += g.advance;
9595
}
9696
prev_cp = cp;

0 commit comments

Comments
 (0)