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

3.3.9 TTF_SetFontKerning

void TTF_SetFontKerning(TTF_Font *font, int allowed)

font
The loaded font to set the outline size of.
allowed
0 to diable kerning.
non-zero to enable kerning. The default is 1, enabled.

Set whther to use kerning when rendering the loaded font. This has no effect on individual glyphs, but rather when rendering whole strings of characters, at least a word at a time. Perhaps the only time to disable this is when kerning is not working for a specific font, resulting in overlapping glyphs or abnormal spacing within words.

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

 
// turn off kerning on the loaded font
//TTF_Font *font;
TTF_SetFontKerning(font, 0);

// render some text string...

// turn kerning back on for the loaded font
TTF_SetFontKerning(font, 1);

See Also:
3.3.8 TTF_GetFontKerning,
see section Kerning,
Kerning @ Wikipedia



This document was generated on November, 13 2009 using texi2html