22 #ifndef ULTIMA8_GFX_FONTS_FONTMANAGER_H 23 #define ULTIMA8_GFX_FONTS_FONTMANAGER_H 25 #include "common/hashmap.h" 26 #include "common/path.h" 27 #include "graphics/font.h" 35 typedef struct _TTF_Font TTF_Font;
45 bool operator<(
const TTFId &other)
const {
46 return (_pointSize < other._pointSize ||
47 (_pointSize == other._pointSize &&
48 _filename < other._filename));
53 uint operator()(
const TTFId &x)
const {
55 int64 val = (int64)&x;
60 bool operator()(
const TTFId &x,
const TTFId &y)
const {
61 return x._filename == y._filename && x._pointSize == y._pointSize;
73 void setOverride(
unsigned int fontnum,
Font *newFont);
92 bool allowOverride =
false);
105 int pointsize, uint32 rgb,
int bordersize,
112 bool addJPOverride(
unsigned int fontnum,
unsigned int jpfont, uint32 rgb);
116 int pointsize, uint32 rgb,
int bordersize);
119 void resetGameFonts();
bool addJPOverride(unsigned int fontnum, unsigned int jpfont, uint32 rgb)
Font * getGameFont(unsigned int fontnum, bool allowOverride=false)
Definition: font_manager.h:40
Definition: detection.h:27
Font * getTTFont(unsigned int ttfnum)
get a TTF font (for non-game fonts)
bool addTTFOverride(unsigned int fontnum, const Common::Path &filename, int pointsize, uint32 rgb, int bordersize, bool SJIS=false)
bool loadTTFont(unsigned int ttfnum, const Common::Path &filename, int pointsize, uint32 rgb, int bordersize)
load a TTF (for non-game fonts)