Adonthell  0.4
win_ttf.h
1 /*
2  (C) Copyright 2004/2016 Kai Sterker
3  Part of the Adonthell Project <http://adonthell.nongnu.org>
4 
5  Adonthell is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9 
10  Adonthell is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with Adonthell. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 #ifndef WIN_TTF_H
20 #define WIN_TTF_H
21 
22 #include <SDL_ttf.h>
23 #include "win_font.h"
24 
25 class win_ttf : public win_font
26 {
27 public:
28  win_ttf (const char *color, const string & file);
29  ~win_ttf ();
30 
31  bool load (const string & file);
32  bool in_table (u_int16 tmp);
33  image & operator[] (u_int16);
34  s_int8 kerning(const u_int16 & char1, const u_int16 & char2);
35 
36 private:
37  SDL_Color Color;
38  static std::string path_;
39  static TTF_Font *ttf;
40  static u_int32 refcount;
41  hash_map<u_int16, s_int16> overflow;
42 };
43 
44 #endif // WIN_TTF_H
45 
u_int32
#define u_int32
32 bits long unsigned integer
Definition: types.h:41
s_int8
#define s_int8
8 bits long signed integer
Definition: types.h:44
image
Image manipulation class.
Definition: image.h:45
win_font
Definition: win_font.h:32
u_int16
#define u_int16
16 bits long unsigned integer
Definition: types.h:38
win_ttf
Definition: win_ttf.h:25