2009-08-18 04:57:39 +03:00
|
|
|
#ifndef __FONTBASE_H__
|
|
|
|
#define __FONTBASE_H__
|
|
|
|
|
|
|
|
/*
|
2009-08-19 13:59:42 +03:00
|
|
|
* FontBase.h, part of VCMI engine
|
2009-08-18 04:57:39 +03:00
|
|
|
*
|
|
|
|
* Authors: listed in file AUTHORS in main folder
|
|
|
|
*
|
|
|
|
* License: GNU General Public License v2.0 or later
|
|
|
|
* Full text of license available in license.txt file, in main folder
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
enum EFonts
|
|
|
|
{
|
|
|
|
FONT_BIG, FONT_CALLI, FONT_CREDITS, FONT_HIGH_SCORE, FONT_MEDIUM, FONT_SMALL, FONT_TIMES, FONT_TINY, FONT_VERD
|
|
|
|
};
|
2011-02-22 13:52:36 +02:00
|
|
|
|
|
|
|
|
2010-07-06 05:10:26 +03:00
|
|
|
struct Font
|
|
|
|
{
|
|
|
|
struct Char
|
|
|
|
{
|
|
|
|
si32 unknown1, width, unknown2, offset;
|
|
|
|
unsigned char *pixels;
|
|
|
|
};
|
|
|
|
|
|
|
|
Char chars[256];
|
|
|
|
ui8 height;
|
|
|
|
|
|
|
|
unsigned char *data;
|
|
|
|
|
|
|
|
|
|
|
|
Font(unsigned char *Data);
|
|
|
|
~Font();
|
|
|
|
int getWidth(const char *text) const;
|
|
|
|
int getCharWidth(char c) const;
|
|
|
|
};
|
2009-08-18 04:57:39 +03:00
|
|
|
|
|
|
|
#endif
|