[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.3.4 TTF_FontHeight

int TTF_FontHeight(TTF_Font *font)

font
The loaded font to get the max height of.

Get the maximum pixel height of all glyphs of the loaded font. You may use this height for rendering text as close together vertically as possible, though adding at least one pixel height to it will space it so they can't touch. Remember that SDL_ttf doesn't handle multiline printing, so you are responsible for line spacing, see the TTF_FontLineSkip as well.

NOTE: Passing a NULL font into this function will cause a segfault.

Returns: The maximum pixel height of all glyphs in the font.

 
// get the loaded font's max height
//TTF_Font *font;
printf("The font max height is: %d\n", TTF_FontHeight(font));

See Also:
3.3.5 TTF_FontAscent,
3.3.6 TTF_FontDescent,
3.3.7 TTF_FontLineSkip,
3.3.12 TTF_GlyphMetrics



This document was generated on January, 14 2006 using texi2html