ScummVM API documentation
ttf.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 GRAPHICS_FONTS_TTF_H
23#define GRAPHICS_FONTS_TTF_H
24
25#include "common/scummsys.h"
26
27#ifdef USE_FREETYPE2
28
29#include "common/array.h"
30#include "common/stream.h"
31#include "common/ustr.h"
32
33namespace Common {
34class Path;
35}
36
37namespace Graphics {
38
39class Font;
40
45enum TTFRenderMode {
49 kTTFRenderModeNormal,
50
54 kTTFRenderModeLight,
55
60 kTTFRenderModeMonochrome,
61
66 kTTFRenderModeNormalWithGridFitting
67};
68
72enum TTFSizeMode {
79 kTTFSizeModeCharacter,
80
87 kTTFSizeModeCell
88};
89
107Font *loadTTFFont(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, int size, TTFSizeMode sizeMode = kTTFSizeModeCharacter, uint xdpi = 0, uint ydpi = 0, TTFRenderMode renderMode = kTTFRenderModeLight, const uint32 *mapping = 0, bool stemDarkening = false);
108
126Font *loadTTFFontFromArchive(const Common::String &filename, int size, TTFSizeMode sizeMode = kTTFSizeModeCharacter, uint xdpi = 0, uint ydpi = 0, TTFRenderMode renderMode = kTTFRenderModeLight, const uint32 *mapping = 0);
127
149Font *findTTFace(const Common::Array<Common::Path> &files, const Common::U32String &faceName, bool bold, bool italic, int size, uint xdpi = 0, uint ydpi = 0,TTFRenderMode renderMode = kTTFRenderModeLight, const uint32 *mapping = 0);
150
151void shutdownTTF();
152
153} // End of namespace Graphics
154
155#endif
156
157#endif
158
Definition: stream.h:745
Definition: str.h:59
Definition: ustr.h:57
Definition: algorithm.h:29
Definition: formatinfo.h:28
Path
Definition: game.h:76