00001 #ifndef __FTSize__ 00002 #define __FTSize__ 00003 00004 00005 #include <ft2build.h> 00006 #include FT_FREETYPE_H 00007 00008 #include "FTGL.h" 00009 00010 00011 00018 class FTGL_EXPORT FTSize 00019 { 00020 public: 00024 FTSize(); 00025 00029 virtual ~FTSize(); 00030 00043 bool CharSize( FT_Face* face, unsigned int point_size, unsigned int x_resolution, unsigned int y_resolution); 00044 00050 unsigned int CharSize() const; 00051 00057 float Ascender() const; 00058 00064 float Descender() const; 00065 00076 float Height() const; 00077 00088 float Width() const; 00089 00095 float Underline() const; 00096 00102 FT_Error Error() const { return err; } 00103 00104 private: 00108 FT_Face* ftFace; 00109 00113 FT_Size ftSize; 00114 00118 unsigned int size; 00119 00123 unsigned int xResolution; 00124 00128 unsigned int yResolution; 00129 00133 FT_Error err; 00134 00135 }; 00136 00137 #endif // __FTSize__ 00138