aboutsummaryrefslogtreecommitdiff
path: root/graphics/font.h
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/font.h')
-rw-r--r--graphics/font.h13
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; \