Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 23, 2006, 8:24:28 PM (19 years ago)
Author:
bensch
Message:

better with fonts

File:
1 edited

Legend:

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

    r8754 r8755  
    1111#define _FONT_H
    1212
    13 #include "texture.h"
     13#include "material.h"
    1414
    1515#include "font_data.h"
     
    1717
    1818//! A class to handle a Font of a certain ttf-File/image-file, Size.
    19 class Font : public Texture
     19class Font : public BaseObject /* TODO Material it should be */
    2020{
    2121
    2222public:
    2323  Font();
    24   Font(const std::string& fontFile,
    25        unsigned int renderSize);
     24  Font(const std::string& fontFile, unsigned int renderSize);
    2625  Font(const std::string& imageFile);
    2726  Font(char** xpmArray);
     
    3130  bool operator==(const Font& font) const { return this->data == font.data; };
    3231
    33   //  font
     32
     33  /// LOADING new Fonts
    3434  bool loadFontFromTTF(const std::string& fontFile);
    3535  bool loadFontFromSDL_Surface(SDL_Surface* surface);
     
    4242  inline TTF_Font* getTTF() const { return this->data->getTTF(); };
    4343
     44  inline GLuint getTexture() const { return this->data->getTexture(); };
     45
     46
    4447  int getMaxHeight() const;
    4548  int getMaxAscent() const;
     
    4952  //inline static Font* getDefaultFont() { if (Font::defaultFont == NULL) initDefaultFont(); return Font::defaultFont; };
    5053
    51 
    52 
    5354  void createAsciiImage(const std::string& fileName, unsigned int size) const;
    5455
    5556  void debug() const ;
     57
    5658private:
    5759  void init();
     
    6062  bool createFastTexture();
    6163
    62 
    6364  void initGlyphs(Uint16 from, Uint16 count);
    6465  int findOptimalFastTextureSize();
    6566
    66 
    67   static FontDataPointer initDefaultFont();
     67  static void initDefaultFont();
    6868
    6969private:
Note: See TracChangeset for help on using the changeset viewer.