102 FONT_TITLE_BIG = 0x01 << 4,
103 FONT_TITLE_NORM = 0x02 << 4,
104 FONT_TITLE_LITTLE = 0x03 << 4,
115 FONT_HIGHLIGHT_NONE = 0x00 << 6,
116 FONT_HIGHLIGHT_LINK = 0x01 << 6,
117 FONT_HIGHLIGHT_TOKEN = 0x02 << 6,
118 FONT_HIGHLIGHT_TYPE = 0x03 << 6,
119 FONT_HIGHLIGHT_CONST = 0x04 << 6,
120 FONT_HIGHLIGHT_REM = 0x05 << 6,
121 FONT_HIGHLIGHT_KEY = 0x06 << 6,
122 FONT_HIGHLIGHT_TABLE = 0x07 << 6,
155 explicit UTF8Char(
char ch1 =
'\0',
char ch2 =
'\0',
char ch3 =
'\0')
156 : c1(ch1), c2(ch2), c3(ch3), pad(
'\0') {}
158 inline bool operator<(
const UTF8Char &other)
const
162 else if (c1 > other.c1)
167 else if (c2 > other.c2)
170 return c3 < other.c3;
173 inline bool operator==(
const UTF8Char &other)
const
175 return c1 == other.c1 && c2 == other.c2 && c3 == other.c3;
201 std::string fileName;
202 std::map<int, CachedFont*> fonts;
264 void DrawText(
const std::string &text, std::vector<FontMetaChar>::iterator format,
265 std::vector<FontMetaChar>::iterator end,
267 int eol,
Color color =
Color(0.0f, 0.0f, 0.0f, 1.0f));
271 int eol,
Color color =
Color(0.0f, 0.0f, 0.0f, 1.0f));
274 void SizeText(
const std::string &text, std::vector<FontMetaChar>::iterator format,
275 std::vector<FontMetaChar>::iterator endFormat,
292 std::vector<FontMetaChar>::iterator format,
293 std::vector<FontMetaChar>::iterator end,
float size);
300 int Justify(
const std::string &text, std::vector<FontMetaChar>::iterator format,
301 std::vector<FontMetaChar>::iterator end,
302 float size,
float width);
304 int Justify(
const std::string &text,
FontType font,
float size,
float width);
307 int Detect(
const std::string &text, std::vector<FontMetaChar>::iterator format,
308 std::vector<FontMetaChar>::iterator end,
309 float size,
float offset);
311 int Detect(
const std::string &text,
FontType font,
float size,
float offset);
313 UTF8Char TranslateSpecialChar(
int specialChar);
319 void DrawString(
const std::string &text, std::vector<FontMetaChar>::iterator format,
320 std::vector<FontMetaChar>::iterator end,
322 void DrawString(
const std::string &text,
FontType font,
326 void StringToUTFCharList(
const std::string &text, std::vector<UTF8Char> &chars);
336 std::map<FontType, MultisizeFont*> m_fonts;