ScummVM API documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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 
33 namespace Common {
34 class Path;
35 }
36 
37 namespace Graphics {
38 
39 class Font;
40 
45 enum TTFRenderMode {
49  kTTFRenderModeNormal,
50 
54  kTTFRenderModeLight,
55 
60  kTTFRenderModeMonochrome
61 };
62 
66 enum TTFSizeMode {
73  kTTFSizeModeCharacter,
74 
81  kTTFSizeModeCell
82 };
83 
101 Font *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);
102 
120 Font *loadTTFFontFromArchive(const Common::String &filename, int size, TTFSizeMode sizeMode = kTTFSizeModeCharacter, uint xdpi = 0, uint ydpi = 0, TTFRenderMode renderMode = kTTFRenderModeLight, const uint32 *mapping = 0);
121 
143 Font *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);
144 
145 void shutdownTTF();
146 
147 } // End of namespace Graphics
148 
149 #endif
150 
151 #endif
152 
Definition: str.h:59
Definition: stream.h:745
Path
Definition: game.h:75
Definition: ustr.h:57
Definition: algorithm.h:29
Definition: formatinfo.h:28