void al_get_text_dimensions(const ALLEGRO_FONT *f,
   char const *text,
   int *bbx, int *bby, int *bbw, int *bbh)
Introduced in 5.0.0

Sometimes, the al_get_text_width and al_get_font_line_height functions are not enough for exact text placement, so this function returns some additional information.

Returned variables (all in pixel):

Note that glyphs may go to the left and upwards of the X, in which case x and y will have negative values.

See also: al_get_text_width, al_get_font_line_height, al_get_ustr_dimensions

Examples: ex_logo, ex_ttf

Most helpful discussions: