|
NAMEal_get_glyph_dimensions - Allegro 5 APISYNOPSIS
DESCRIPTIONSometimes, the al_get_glyph_width(3) or al_get_glyph_advance(3) functions are not enough for exact glyph placement, so this function returns some additional information, particularly if you want to draw the font vertically.The function itself returns true if the character was present in font and false if the character was not present in font. Returned variables (all in pixel):
These values are the same as al_get_text_dimensions(3) would return for a string of a single character equal to the glyph passed to this function. Note that glyphs may go to the left and upwards of the X, in which case x and y will have negative values. If you want to draw a string verticallly, for Japanese or as a game effect, then you should leave bby + bbh space between the glyphs in the y direction for a regular placement. If you want to draw a string horizontally in an extra compact way, then you should leave bbx + bbw space between the glyphs in the x direction for a compact placement. In the figure below is an example of what bbx and bby may be like for a 2 glyph, and a g glyph of the same font compared to the result of al_get_glyph_width().
SINCE5.1.12SEE ALSOal_draw_glyph(3), al_get_glyph_width(3), al_get_glyph_advance(3).
Visit the GSP FreeBSD Man Page Interface. |