22 #ifndef ULTIMA8_GFX_FONTS_FONTMANAGER_H 23 #define ULTIMA8_GFX_FONTS_FONTMANAGER_H 25 #include "ultima/shared/std/containers.h" 26 #include "ultima/shared/std/string.h" 27 #include "common/path.h" 28 #include "graphics/font.h" 36 typedef struct _TTF_Font TTF_Font;
46 bool operator<(
const TTFId &other)
const {
47 return (_pointSize < other._pointSize ||
48 (_pointSize == other._pointSize &&
49 _filename < other._filename));
54 uint operator()(
const TTFId &x)
const {
56 int64 val = (int64)&x;
61 bool operator()(
const TTFId &x,
const TTFId &y)
const {
62 return x._filename == y._filename && x._pointSize == y._pointSize;
74 void setOverride(
unsigned int fontnum,
Font *newFont);
93 bool allowOverride =
false);
106 int pointsize, uint32 rgb,
int bordersize,
113 bool addJPOverride(
unsigned int fontnum,
unsigned int jpfont, uint32 rgb);
117 int pointsize, uint32 rgb,
int bordersize);
120 void resetGameFonts();
bool addJPOverride(unsigned int fontnum, unsigned int jpfont, uint32 rgb)
Font * getGameFont(unsigned int fontnum, bool allowOverride=false)
Definition: font_manager.h:41
Definition: detection.h:27
Font * getTTFont(unsigned int ttfnum)
get a TTF font (for non-game fonts)
Definition: containers.h:38
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)