ScummVM API documentation
gr_font.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef M4_GRAPHICS_GR_FONT_H
23 #define M4_GRAPHICS_GR_FONT_H
24 
25 #include "common/str.h"
26 #include "m4/m4_types.h"
27 
28 namespace M4 {
29 
30 struct Font {
31  byte max_y_size;
32  byte max_x_size;
33  uint32 dataSize;
34 
35  byte *width;
36  int16 *offset;
37  byte *pixData;
38 };
39 
40 void gr_font_system_shutdown();
41 void gr_font_dealloc(Font *killMe);
42 Font *gr_font_create_system_font();
43 void gr_font_set_color(uint8 foreground);
44 Font *gr_font_get();
45 void gr_font_set(Font *font);
46 int32 gr_font_get_height();
47 int32 gr_font_write(Buffer *target, char *out_string, int32 x, int32 y,
48  int32 w, int32 auto_spacing = 1);
49 int32 gr_font_write(Buffer *target, const char *out_string, int32 x, int32 y,
50  int32 w, int32 auto_spacing);
51 int32 gr_font_string_width(char *out_string, int32 auto_spacing = 1);
52 int32 gr_font_string_width(const Common::String &str, int32 auto_spacing = 1);
53 
54 Font *gr_font_load(const char *fontName);
55 
56 void font_set_colors(uint8 alt1, uint8 alt2, uint8 foreground);
57 
58 } // namespace M4
59 
60 #endif
Definition: str.h:59
Definition: gr_font.h:30
Definition: m4_types.h:67
Definition: database.h:28