22 #ifndef GRAPHICS_MACGUI_MACFONTMANAGER_H 23 #define GRAPHICS_MACGUI_MACFONTMANAGER_H 25 #include "common/language.h" 26 #include "graphics/fonts/bdf.h" 27 #include "graphics/fontman.h" 30 #include "graphics/fonts/ttf.h" 34 class SeekableReadStream;
49 kMacFontNonStandard = -1,
51 kMacFontApplication = 1,
59 kMacFontSanFrancisco = 8,
62 kMacFontLosAngeles = 12,
63 kMacFontZapfDingbats = 13,
65 kMacFontHelveticaNarrow = 15,
66 kMacFontPalatino = 16,
67 kMacFontZapfChancery = 18,
69 kMacFontHelvetica = 21,
72 kMacFontTaliesin = 24,
73 kMacFontAvantGarde = 33,
74 kMacFontNewCenturySchoolbook = 34,
75 kMacFontChicago = 16383,
77 kMacFontOsaka = 16384,
78 kMacFontBookMinchoM = 16396,
79 kMacFontMonoGothic = 16433,
80 kMacFontMonoMing = 16435,
81 kMacFontOsakaMono = 16436,
82 kMacFontMediumGothic = 16640,
84 kMacFontHeiseiMincho = 16700,
85 kMacFontHeiseiKakuGothic = 16701
92 kMacFontUnderline = 4,
95 kMacFontCondense = 32,
103 Common::CodePage encoding;
107 FontInfo() : lang(Common::UNK_LANG), encoding(Common::kCodePageInvalid), aliasForId(-1) {}
112 MacFont(
int id = kMacFontSystem,
int size = 12,
int slant = kMacFontRegular) {
114 _size = size ? size : 12;
116 _fallback =
FontMan.getFontByUsage(Graphics::FontManager::kBigGUIFont);
123 int getId()
const {
return _id; };
124 void setId(
int id) { _id = id; }
125 int getSize()
const {
return _size; }
126 int getSlant()
const {
return _slant; }
129 void setName(
const char *name);
131 bool isGenerated()
const {
return _generated; }
132 void setGenerated(
bool gen) { _generated = gen; }
133 bool isTrueType()
const {
return _truetype; }
134 Font *getFont()
const {
return _font; }
135 void setFont(
Font *font,
bool truetype) { _font = font; _truetype = truetype; }
157 void setLocalizedFonts();
179 const Common::String getFontName(uint16
id,
int size,
int slant = kMacFontRegular,
bool tryGen =
false);
184 Common::CodePage getFontEncoding(uint16
id);
185 int getFontAliasForId(uint16
id);
200 void forceBuiltinFonts() { _builtInFonts =
true; }
206 void printFontRegistry(
int debugLevel, uint32 channel);
210 int getFamilyId(
int newId,
int newSlant);
218 void setTTFRenderMode(TTFRenderMode mode) { _ttfRenderMode = mode; }
219 TTFRenderMode getTTFRenderMode()
const {
return _ttfRenderMode; }
225 void loadJapaneseFonts();
227 void generateFontSubstitute(
MacFont &macFont);
232 TTFRenderMode _ttfRenderMode = Graphics::kTTFRenderModeMonochrome;
237 bool _japaneseFontsLoaded;
Definition: macresman.h:126
Definition: macfontmanager.h:152
#define FontMan
Definition: fontman.h:135
Definition: macfont.h:165
Definition: macfontmanager.h:40
Definition: macfontmanager.h:101
Definition: algorithm.h:29
Definition: formatinfo.h:28
Definition: macfontmanager.h:110
bool hasBuiltInFonts()
Definition: macfontmanager.h:163
Language
Definition: language.h:45