1 /**
2  * Fonts
3 
4  * Copyright (C) 2007, 2008  Sylvain Beucler
5 
6  * This file is part of GNU FreeDink
7 
8  * GNU FreeDink is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License as
10  * published by the Free Software Foundation; either version 3 of the
11  * License, or (at your option) any later version.
12 
13  * GNU FreeDink is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * General Public License for more details.
17 
18  * You should have received a copy of the GNU General Public License
19  * along with this program.  If not, see
20  * <http://www.gnu.org/licenses/>.
21  */
22 
23 #ifndef _GFX_FONTS_H
24 #define _GFX_FONTS_H
25 
26 #include "SDL_ttf.h"
27 #include "rect.h"
28 
29 
30 typedef enum enum_font
31 {
32     FONT_DIALOG = 0,
33     FONT_SYSTEM,
34 } FONT_TYPE;
35 
36 
37 extern int gfx_fonts_init(void);
38 extern int gfx_fonts_init_failsafe(void);
39 extern void gfx_fonts_init_colors(void);
40 extern void gfx_fonts_quit(void);
41 extern void FONTS_SetTextColor(Uint8 r, Uint8 g, Uint8 b);
42 extern void FONTS_SetTextColorIndex(int no);
43 extern int print_text_wrap(char *str, rect * box, /*bool*/int hcenter, int calc_only, FONT_TYPE font_type);
44 extern void print_text_wrap_debug(char *str, int x, int y);
45 
46 
47 extern void SaySmall(char thing[500], int px, int py, int r, int g, int b);
48 extern void Say(char thing[500], int px, int py);
49 
50 /* DinkC binding */
51 extern int initfont(char* fontname);
52 extern void set_font_color(int no, int red, int green, int blue);
53 #endif
54