diff options
author | Johannes Schickel | 2006-04-14 02:16:55 +0000 |
---|---|---|
committer | Johannes Schickel | 2006-04-14 02:16:55 +0000 |
commit | 96cf7028b98cd12e2278b37aee43b3d669214abb (patch) | |
tree | c9ea75045b671229d8ac4e2656d8475ac5909471 /graphics/font.h | |
parent | 1470dadb1de3250dfceeaa246604ca0f26889bbf (diff) | |
download | scummvm-rg350-96cf7028b98cd12e2278b37aee43b3d669214abb.tar.gz scummvm-rg350-96cf7028b98cd12e2278b37aee43b3d669214abb.tar.bz2 scummvm-rg350-96cf7028b98cd12e2278b37aee43b3d669214abb.zip |
- implements .bdf font loader based on convbdf (sure could have some clean up)
- adds three different font styles to the themes (normal, bold (default one), italic)
- implements code for specifing the font files in the theme config ('fontfile_normal','fontfile_bold' and 'fontfile_italic' in the 'extra' section)
- changes EditTextWidget to use the normal font (has some minor aligment problems with the caret now, though)
- extends the FontManager (new functions: getFontByName, assignFontToName, removeFontName)
- adds the font style constans to the builtin constants for the evaluator)
svn-id: r21868
Diffstat (limited to 'graphics/font.h')
-rw-r--r-- | graphics/font.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/graphics/font.h b/graphics/font.h index b3ed02c3b4..f9d0cb6033 100644 --- a/graphics/font.h +++ b/graphics/font.h @@ -25,6 +25,10 @@ #include "common/str.h" #include "graphics/surface.h" +namespace Common { +class SeekableReadStream; +} + namespace Graphics { // Text alignment modes for drawString() @@ -103,12 +107,16 @@ struct FontDesc { long bits_size; /* # words of bitmap_t bits*/ }; +struct NewFontData; + class NewFont : public Font { protected: FontDesc desc; + NewFontData *font; public: - NewFont(const FontDesc &d) : desc(d) {} + NewFont(const FontDesc &d, NewFontData *font_ = 0) : desc(d), font(font_) {} + ~NewFont(); virtual int getFontHeight() const { return desc.height; } virtual int getMaxCharWidth() const { return desc.maxwidth; }; @@ -117,6 +125,9 @@ public: virtual void drawChar(Surface *dst, byte chr, int x, int y, uint32 color) const; }; +NewFont *loadFont(Common::SeekableReadStream &stream); +NewFont *loadFont(const byte *src, uint32 size); + #if (defined(PALMOS_ARM) || defined(PALMOS_DEBUG) || defined(__GP32__)) # define DEFINE_FONT(n) \ const NewFont *n; \ |