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

3.3.18 TTF_GlyphIsProvided

int TTF_GlyphIsProvided(const TTF_Font *font, Uint16 ch)

font
The loaded font to get the glyph availability in.
ch
the unicode character to test glyph availability of.

Get the status of the availability of the glyph for ch from the loaded font.
NOTE: Passing a NULL font into this function will cause a segfault.

Returns: the index of the glyph for ch in font, or 0 for an undefined character code.

 
// check for a glyph for 'g' in the loaded font
//TTF_Font *font;

int index=TTF_GlyphIsProvided(font,'g');
if(!index)
    printf("There is no 'g' in the loaded font!\n");

See Also:
3.3.19 TTF_GlyphMetrics



This document was generated on November, 13 2009 using texi2html