00001 #ifndef __FTCharmap__ 00002 #define __FTCharmap__ 00003 00004 00005 #include <ft2build.h> 00006 #include FT_FREETYPE_H 00007 #include FT_GLYPH_H 00008 00009 #include "FTCharToGlyphIndexMap.h" 00010 00011 #include "FTGL.h" 00012 00013 00027 class FTFace; 00028 00029 class FTGL_EXPORT FTCharmap 00030 { 00031 public: 00035 FTCharmap( FTFace* face); 00036 00040 virtual ~FTCharmap(); 00041 00047 FT_Encoding Encoding() const { return ftEncoding;} 00048 00071 bool CharMap( FT_Encoding encoding); 00072 00081 unsigned int GlyphListIndex( const unsigned int characterCode); 00082 00090 unsigned int FontIndex( const unsigned int characterCode); 00091 00100 void InsertIndex( const unsigned int characterCode, const unsigned int containerIndex); 00101 00107 FT_Error Error() const { return err;} 00108 00109 private: 00113 FT_Encoding ftEncoding; 00114 00118 const FT_Face ftFace; 00119 00125 typedef FTCharToGlyphIndexMap CharacterMap; 00126 CharacterMap charMap; 00127 00131 FT_Error err; 00132 00133 }; 00134 00135 00136 #endif // __FTCharmap__