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
28namespace M4 {
29
30struct 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
40void gr_font_system_shutdown();
41void gr_font_dealloc(Font *killMe);
42Font *gr_font_create_system_font();
43void gr_font_set_color(uint8 foreground);
44Font *gr_font_get();
45void gr_font_set(Font *font);
46int32 gr_font_get_height();
47int32 gr_font_write(Buffer *target, char *out_string, int32 x, int32 y,
48 int32 w, int32 auto_spacing = 1);
49int32 gr_font_write(Buffer *target, const char *out_string, int32 x, int32 y,
50 int32 w, int32 auto_spacing);
51int32 gr_font_string_width(char *out_string, int32 auto_spacing = 1);
52int32 gr_font_string_width(const Common::String &str, int32 auto_spacing = 1);
53
54Font *gr_font_load(const char *fontName);
55
56void font_set_colors(uint8 alt1, uint8 alt2, uint8 foreground);
57
58} // namespace M4
59
60#endif
Definition: str.h:59
Definition: database.h:28
Definition: m4_types.h:54
Definition: gr_font.h:30