22 #ifndef SHERLOCK_FONTS_H 23 #define SHERLOCK_FONTS_H 25 #include "common/rect.h" 26 #include "common/platform.h" 27 #include "graphics/big5.h" 28 #include "graphics/surface.h" 38 struct ChinaFontCodElement {
44 static byte *_chineseFont;
46 static byte _yOffsets[255];
47 static int _fontNumber;
48 static int _fontHeight;
49 static int _widestChar;
50 static uint16 _charCount;
51 static bool _isModifiedEucCn;
54 static inline byte translateChar(byte c);
62 static const int kChineseWidth = 16;
63 static const int kChineseHeight = 16;
75 static bool isModifiedEucCn() {
return _isModifiedEucCn; }
76 static bool isBig5() {
return _isBig5; }
113 int fontHeight()
const {
return _chineseFont || _isBig5 ?
MAX(_fontHeight, 16) : _fontHeight; }
126 uint maxChars = Common::String::npos, uint maxLines = Common::String::npos,
bool skipHeadAt =
false);
128 uint maxChars = Common::String::npos, uint maxLines = Common::String::npos,
bool skipHeadAt =
false);
static void setVm(SherlockEngine *vm)
Definition: animation.h:29
int charHeight(unsigned char c)
int stringWidth(const Common::String &str)
Definition: sherlock.h:76
Definition: image_file.h:78
int fontHeight() const
Definition: fonts.h:113
int charWidth(const char *str, int &idx)
T MAX(T a, T b)
Definition: util.h:62
int stringHeight(const Common::String &str)
int widestChar() const
Definition: fonts.h:118
void setFont(int fontNum)
int fontNumber() const
Definition: fonts.h:123