Tao.Sdl SDK Documentation

SdlTtf.TTF_FontDescent Method 

Get font min descent (y below origin). Get the offset from the baseline to the bottom of the font This is a negative value, relative to the baseline.

[Visual Basic]
Public Shared Function TTF_FontDescent( _
   ByVal font As IntPtr _
) As Integer
[C#]
public static int TTF_FontDescent(
   IntPtr font
);

Parameters

font
The loaded font to get the descent (height below baseline) of

Return Value

The maximum pixel height of all glyphs in the font.

Remarks

Get the maximum pixel descent of all glyphs of the loaded font. This can also be interpreted as the distance from the baseline to the bottom of the font. It could be used when drawing an individual glyph relative to a bottom point, by combining it with the glyph's maxy metric to resolve the top of the rectangle used when blitting the glyph on the screen.

rect.y = bottom - TTF_FontDescent(font) - glyph_metric.maxy;

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

Binds to C-function in SDL_ttf.h

            int TTF_FontDescent(TTF_Font *font)
            

Example

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

See Also

SdlTtf Class | Tao.Sdl Namespace | TTF_FontHeight | TTF_FontAscent | TTF_FontLineSkip