Changeset 5768 in orxonox.OLD for trunk/src/lib/graphics/text_engine/font.h
- Timestamp:
- Nov 24, 2005, 8:24:52 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/text_engine/font.h
r5767 r5768 11 11 #define _FONT_H 12 12 13 #include " base_object.h"13 #include "texture.h" 14 14 15 15 #include "glincl.h" … … 52 52 53 53 //! A class to handle a Font of a certain ttf-File/image-file, Size. 54 class Font : public BaseObject54 class Font : public Texture 55 55 { 56 56 public: … … 63 63 void init(); 64 64 65 // font65 // font 66 66 bool loadFontFromTTF(const char* fontFile); 67 67 bool loadFontFromSDL_Surface(SDL_Surface* surface); … … 71 71 /** @returns a Pointer to the Array of Glyphs */ 72 72 inline Glyph** getGlyphArray() const { return this->glyphArray; }; 73 /** @returns the texture to the fast-texture */ 74 inline GLuint getFastTextureID() const { return this->fastTextureID; }; 73 /** @returns the a pointer to the TTF */ 74 inline TTF_Font* getTTF() const { return this->fontTTF; }; 75 76 75 77 /** @returns the default Font */ 76 78 inline static Font* getDefaultFont() { if (Font::defaultFont == NULL) initDefaultFont(); return Font::defaultFont; }; 77 /** @returns the a pointer to the TTF */78 inline TTF_Font* getTTF() const { return this->fontTTF; };79 79 80 80 void createAsciiImage(const char* fileName); 81 81 static void initDefaultFont(); 82 82 static void removeDefaultFont(); 83 84 83 85 84 private: … … 89 88 Glyph* getGlyphMetrics(Uint16 character); 90 89 91 GLuintcreateFastTexture();90 bool createFastTexture(); 92 91 93 92 void initGlyphs(Uint16 from, Uint16 count); … … 104 103 105 104 Glyph** glyphArray; //!< An Array of all the Glyphs stored in the Array of Glyphs. 106 GLuint fastTextureID; //!< The fast textureID.107 105 }; 108 106
Note: See TracChangeset
for help on using the changeset viewer.