Changeset 5368 in orxonox.OLD for trunk/src/lib/graphics/text_engine/font.h
- Timestamp:
- Oct 13, 2005, 12:00:01 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/text_engine/font.h
r5367 r5368 37 37 // Glyph-specific (size and so on) 38 38 Uint16 character; //!< The character 39 intminX; //!< The minimum distance from the origin in X40 intmaxX; //!< The maximum distance from the origin in X41 intminY; //!< The minimum distance from the origin in Y42 intmaxY; //!< The maximum distance from the origin in Y43 intwidth; //!< The width of the Glyph44 intheight; //!< The height of the Glyph45 intbearingX; //!< How much is right of the Origin46 intbearingY; //!< How much is above the Origin47 intadvance; //!< How big a Glyph would be in monospace-mode39 float minX; //!< The minimum distance from the origin in X 40 float maxX; //!< The maximum distance from the origin in X 41 float minY; //!< The minimum distance from the origin in Y 42 float maxY; //!< The maximum distance from the origin in Y 43 float width; //!< The width of the Glyph 44 float height; //!< The height of the Glyph 45 float bearingX; //!< How much is right of the Origin 46 float bearingY; //!< How much is above the Origin 47 float advance; //!< How big a Glyph would be in monospace-mode 48 48 49 49 GLfloat texCoord[4]; //!< Texture coordinates: 0:left, 1:right, 2: top, 3: bottom. … … 58 58 public: 59 59 Font(const char* fontFile, 60 unsigned int fontSize);60 unsigned int renderSize); 61 61 Font(const char* imageFile); 62 62 Font(char** xpmArray); … … 66 66 67 67 // font 68 bool loadFont (const char* fontFile);68 bool loadFontFromTTF(const char* fontFile); 69 69 bool loadFontFromSDL_Surface(SDL_Surface* surface); 70 70 71 void setSize(unsigned int fontSize);72 71 void setStyle(const char* renderStyle); 73 72 … … 82 81 static void initDefaultFont(); 83 82 static void removeDefaultFont(); 83 84 84 85 85 private: … … 99 99 static Font* defaultFont; //!< a default font, that is used, if other fonts were unable to be loaded. 100 100 // information about the Font 101 TTF_Font* font; //!< The font we use for this. 102 unsigned int fontSize; //!< The size of the font in pixels. each Font has one size. 101 TTF_Font* fontTTF; //!< The font we use for this. 103 102 int renderStyle; //!< The Renderstyle 103 unsigned int renderSize; //!< How big the Font should be rendered. 104 104 105 105 Glyph** glyphArray; //!< An Array of all the Glyphs stored in the Array of Glyphs.
Note: See TracChangeset
for help on using the changeset viewer.