ScummVM API documentation
macfont.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 SCI_GRAPHICS_MACFONT_H
23 #define SCI_GRAPHICS_MACFONT_H
24 
25 #include "common/hashmap.h"
26 #include "sci/graphics/helpers.h" // for GuiResourceId
27 
28 namespace Common {
29 class MacResManager;
30 }
31 namespace Graphics {
32 class MacFontManager;
33 class Font;
34 }
35 
36 namespace Sci {
37 
79 public:
80  GfxMacFontManager(Common::MacResManager *macExecutable = nullptr);
82 
83  bool hasFonts();
84  bool usesSystemFonts();
85  const Graphics::Font *getSmallFont(GuiResourceId sciFontId);
86  const Graphics::Font *getLargeFont(GuiResourceId sciFontId);
87 
88 private:
89  bool initFromFontTable(Common::MacResManager *macExecutable);
90  const Graphics::Font *getMacFont(int macFontId, int size);
91 
92  struct MacFontItem {
93  const Graphics::Font *smallFont;
94  const Graphics::Font *largeFont;
95  };
96 
97  bool _usesSystemFonts;
98  Graphics::MacFontManager *_macFontManager;
100  MacFontItem *_defaultFont;
101 };
102 
103 } // End of namespace Sci
104 
105 #endif // SCI_GRAPHICS_MACFONT_H
Definition: macresman.h:125
Definition: font.h:83
Definition: macfont.h:78
Definition: macfontmanager.h:127
Definition: hashmap.h:85
Definition: algorithm.h:29
Definition: formatinfo.h:28
Definition: console.h:28