SDL_ttf
SDL_ttf copied to clipboard
Add TTF_GetFontBBox() which returns font's extremum bounding box
Resolve #536
This adds a new function called TTF_GetFontBBox:
extern DECLSPEC void SDLCALL TTF_GetFontBBox(const TTF_Font *font, TTF_BBox *bbox);
and a struct TTF_BBox (simply a pair of xmin/max and ymin/max offsets).
This function may be used to query font's bbox, which is a bounding box enough to suit any glyph from this font. Function description is based on FreeType comments to FT_Face's bbox field.
I was not certain which version to mention in comments, so put 2.26.0, as that seems to be the next release number, theoretically?