FT_UInt FT_Get_Char_Index(FT_Face Face, FT_ULong Caractere);
Le résultat est 0 si le caractère n'existe pas. Cela correspond au caractère par défaut.
#include <ft2build.h>
#include <freetype/ftoutln.h>
#include <freetype/ftstroke.h>
FT_Library Bibliotheque;
char NomFichierPolice[256];
FT_Face Face;
wchar_t Caractere;
FT_UInt IndexGlyphe;
...
if (FT_New_Face(Bibliotheque, NomFichierPolice, 0, &Face))
{
...
}
...
if (FT_Select_Charmap(Face, FT_ENCODING_UNICODE))
{
...
}
...
if (FT_Get_Char_Index(Face, (FT_ULong)Caractere))
{
...
}
...
if (FT_Done_Face(Face))
{
...
}
...