Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

FTFace.h

Go to the documentation of this file.
00001 #ifndef     __FTFace__
00002 #define     __FTFace__
00003 
00004 #include <ft2build.h>
00005 #include FT_FREETYPE_H
00006 #include FT_GLYPH_H
00007 
00008 #include "FTGL.h"
00009 #include "FTPoint.h"
00010 #include "FTSize.h"
00011 
00018 class FTGL_EXPORT FTFace
00019 {
00020     public:
00026         FTFace( const char* filename);
00027 
00034         FTFace( const unsigned char *pBufferBytes, size_t bufferSizeInBytes );
00035 
00041         virtual ~FTFace();
00042 
00050         bool Attach( const char* filename);
00051 
00060         bool Attach( const unsigned char *pBufferBytes, size_t bufferSizeInBytes);
00061 
00065         void Close();
00066 
00072         FT_Face* Face() const { return ftFace;}
00073         
00084         const FTSize& Size( const unsigned int size, const unsigned int res);
00085 
00086         unsigned int UnitsPerEM() const;
00087 
00093         unsigned int CharMapCount();
00094 
00100         FT_Encoding* CharMapList();
00101         
00105         FTPoint KernAdvance( unsigned int index1, unsigned int index2);
00106 
00110         FT_GlyphSlot Glyph( unsigned int index, FT_Int load_flags);
00111 
00115         unsigned int GlyphCount() const { return numGlyphs;}
00116 
00122         FT_Error Error() const { return err; }
00123         
00124     private:
00128         FT_Face* ftFace;
00129 
00133         FTSize  charSize;
00134         
00138         int numGlyphs;
00139         
00140         FT_Encoding* fontEncodingList;
00141 
00145         FT_Error err;
00146 };
00147 
00148 
00149 #endif  //  __FTFace__

Generated on Mon Aug 16 18:47:18 2004 for FTGL by doxygen 1.3.6