Changeset 8758 in orxonox.OLD for branches/fontdata/src/lib/graphics/text_engine/font.h
- Timestamp:
- Jun 23, 2006, 10:20:35 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/fontdata/src/lib/graphics/text_engine/font.h
r8756 r8758 17 17 18 18 //! A class to handle a Font of a certain ttf-File/image-file, Size. 19 class Font : public BaseObject/* TODO Material it should be */19 class Font : public Material /* TODO Material it should be */ 20 20 { 21 21 … … 27 27 virtual ~Font(); 28 28 29 Font& operator=(const Font& font) { this->data = font.data; return *this; };29 Font& operator=(const Font& font); 30 30 bool operator==(const Font& font) const { return this->data == font.data; }; 31 31 … … 42 42 inline TTF_Font* getTTF() const { return this->data->getTTF(); }; 43 43 44 inline GLuint getTexture() const { return this->data->getTexture(); };45 46 47 44 int getMaxHeight() const; 48 45 int getMaxAscent() const; … … 52 49 //inline static Font* getDefaultFont() { if (Font::defaultFont == NULL) initDefaultFont(); return Font::defaultFont; }; 53 50 51 54 52 void createAsciiImage(const std::string& fileName, unsigned int size) const; 55 53 56 void debug() const 54 void debug() const; 57 55 58 56 private: 59 57 void init(); 58 void initGlyphs(Uint16 from, Uint16 count); 60 59 bool getGlyphMetrics(Glyph* glyph, Uint16 character); 60 static void initDefaultFont(); 61 61 62 int findOptimalFastTextureSize(); 62 63 bool createFastTexture(); 63 64 64 void initGlyphs(Uint16 from, Uint16 count); 65 int findOptimalFastTextureSize(); 65 bool setTexture(GLuint texture); 66 66 67 static void initDefaultFont();68 67 69 68 private:
Note: See TracChangeset
for help on using the changeset viewer.