Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 23, 2006, 10:20:35 PM (19 years ago)
Author:
bensch
Message:

font is a Material now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/fontdata/src/lib/graphics/text_engine/font.h

    r8756 r8758  
    1717
    1818//! A class to handle a Font of a certain ttf-File/image-file, Size.
    19 class Font : public BaseObject /* TODO Material it should be */
     19class Font : public Material /* TODO Material it should be */
    2020{
    2121
     
    2727  virtual ~Font();
    2828
    29   Font& operator=(const Font& font) { this->data = font.data; return *this; };
     29  Font& operator=(const Font& font);
    3030  bool operator==(const Font& font) const { return this->data == font.data; };
    3131
     
    4242  inline TTF_Font* getTTF() const { return this->data->getTTF(); };
    4343
    44   inline GLuint getTexture() const { return this->data->getTexture(); };
    45 
    46 
    4744  int getMaxHeight() const;
    4845  int getMaxAscent() const;
     
    5249  //inline static Font* getDefaultFont() { if (Font::defaultFont == NULL) initDefaultFont(); return Font::defaultFont; };
    5350
     51
    5452  void createAsciiImage(const std::string& fileName, unsigned int size) const;
    5553
    56   void debug() const ;
     54  void debug() const;
    5755
    5856private:
    5957  void init();
     58  void initGlyphs(Uint16 from, Uint16 count);
    6059  bool getGlyphMetrics(Glyph* glyph, Uint16 character);
     60  static void initDefaultFont();
    6161
     62  int findOptimalFastTextureSize();
    6263  bool createFastTexture();
    6364
    64   void initGlyphs(Uint16 from, Uint16 count);
    65   int findOptimalFastTextureSize();
     65  bool setTexture(GLuint texture);
    6666
    67   static void initDefaultFont();
    6867
    6968private:
Note: See TracChangeset for help on using the changeset viewer.