The Game Engine  1
Font.h
Go to the documentation of this file.
1 #ifndef __FONT_H__
2 #define __FONT_H__
3 #include <stdio.h>
4 #include <stdlib.h>
5 #include <string>
6 #include <SDL/SDL.h>
7 #include <SDL/SDL_ttf.h>
8 #include "fns.h"
9 using namespace std;
10 
17 class Font
18 {
19 public:
20 
22  TTF_Font* font;
23 
26 
28  string fontFile;
29 
31  int size;
32 
34  int count;
35 
40  Font(int s = 24);
41 
47  Font(FontType t, int s = 24);
48  ~Font();
49 
50  //closes the font and changes the size
51  void setSize(int s);
52 
53 protected:
58  bool tryLoadFont();
59 };
60 #endif