Font.h 832 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #ifndef FONT_H_
  2. #define FONT_H_
  3. #include "Object.h"
  4. #include "Glyph.h"
  5. namespace gameplay
  6. {
  7. class Font : public Object
  8. {
  9. public:
  10. /**
  11. * Constructor.
  12. */
  13. Font(void);
  14. /**
  15. * Destructor.
  16. */
  17. virtual ~Font(void);
  18. virtual unsigned int getTypeId(void) const;
  19. virtual const char* getElementName(void) const;
  20. virtual void writeBinary(FILE* file);
  21. virtual void writeText(FILE* file);
  22. std::string family;
  23. unsigned int style;
  24. unsigned int size;
  25. std::string charset;
  26. std::list<Glyph*> glyphs;
  27. unsigned int texMapWidth;
  28. unsigned int texMapHeight;
  29. std::list<unsigned char> texMap;
  30. enum FontStyle
  31. {
  32. PLAIN = 0,
  33. BOLD = 1,
  34. ITALIC = 2,
  35. BOLD_ITALIC = 4
  36. };
  37. };
  38. }
  39. #endif