00001 #ifndef __FTGlyphContainer__ 00002 #define __FTGlyphContainer__ 00003 00004 #include <ft2build.h> 00005 #include FT_FREETYPE_H 00006 #include FT_GLYPH_H 00007 00008 #include "FTGL.h" 00009 #include "FTBBox.h" 00010 #include "FTPoint.h" 00011 #include "FTVector.h" 00012 00013 class FTFace; 00014 class FTGlyph; 00015 class FTCharmap; 00016 00022 class FTGL_EXPORT FTGlyphContainer 00023 { 00024 typedef FTVector<FTGlyph*> GlyphVector; 00025 public: 00031 FTGlyphContainer( FTFace* face); 00032 00036 ~FTGlyphContainer(); 00037 00045 bool CharMap( FT_Encoding encoding); 00046 00054 unsigned int FontIndex( const unsigned int characterCode ) const; 00055 00062 void Add( FTGlyph* glyph, const unsigned int characterCode); 00063 00071 const FTGlyph* const Glyph( const unsigned int characterCode) const; 00072 00077 FTBBox BBox( const unsigned int characterCode) const; 00078 00086 float Advance( const unsigned int characterCode, const unsigned int nextCharacterCode); 00087 00095 FTPoint Render( const unsigned int characterCode, const unsigned int nextCharacterCode, FTPoint penPosition); 00096 00102 FT_Error Error() const { return err;} 00103 00104 private: 00108 FTFace* face; 00109 00113 FTCharmap* charMap; 00114 00118 GlyphVector glyphs; 00119 00123 FT_Error err; 00124 }; 00125 00126 00127 #endif // __FTGlyphContainer__