aboutsummaryrefslogtreecommitdiff
path: root/graphics/fonts/macfont.h
diff options
context:
space:
mode:
authorEugene Sandulenko2017-01-17 18:14:02 +0100
committerEugene Sandulenko2017-01-17 18:14:02 +0100
commitbe07b004e000cdafc59a43eaefc4fc85ab19f431 (patch)
treec0d62ee0a1502e0bb5c3f3b7b9ea1a841c91c356 /graphics/fonts/macfont.h
parentd391932ac4cc231723b935a295c8f176cd089bac (diff)
downloadscummvm-rg350-be07b004e000cdafc59a43eaefc4fc85ab19f431.tar.gz
scummvm-rg350-be07b004e000cdafc59a43eaefc4fc85ab19f431.tar.bz2
scummvm-rg350-be07b004e000cdafc59a43eaefc4fc85ab19f431.zip
GRAPHICS: Split out MacFontFamily class out of MacFont
Diffstat (limited to 'graphics/fonts/macfont.h')
-rw-r--r--graphics/fonts/macfont.h64
1 files changed, 36 insertions, 28 deletions
diff --git a/graphics/fonts/macfont.h b/graphics/fonts/macfont.h
index c357346c29..935fbb2e98 100644
--- a/graphics/fonts/macfont.h
+++ b/graphics/fonts/macfont.h
@@ -28,38 +28,14 @@
namespace Graphics {
-/**
- * Processing of Mac FONT/NFNT rResources
- */
-class MacFont : public Font {
+class MacFontFamily {
public:
- MacFont();
- virtual ~MacFont();
+ MacFontFamily();
+ ~MacFontFamily();
- virtual int getFontHeight() const;
- virtual int getMaxCharWidth() const;
- virtual int getCharWidth(uint32 chr) const;
- virtual void drawChar(Surface *dst, uint32 chr, int x, int y, uint32 color) const;
-
- bool loadFont(Common::SeekableReadStream &stream);
- bool loadFOND(Common::SeekableReadStream &stream);
+ bool load(Common::SeekableReadStream &stream);
private:
- // FONT/NFNT
- uint16 _fontType;
- uint16 _firstChar;
- uint16 _lastChar;
- uint16 _maxWidth;
- int16 _kernMax;
- int16 _nDescent;
- uint16 _fRectWidth;
- uint16 _fRectHeight;
- uint32 _owTLoc;
- uint16 _ascent;
- uint16 _descent;
- uint16 _leading;
- uint16 _rowWords;
-
// FOND
uint16 _ffFlags;
uint16 _ffFamID;
@@ -113,6 +89,38 @@ private:
uint16 _ffNumKerns;
Common::Array<KernEntry> _ffKernEntries;
+};
+
+/**
+ * Processing of Mac FONT/NFNT rResources
+ */
+class MacFont : public Font {
+public:
+ MacFont();
+ virtual ~MacFont();
+
+ virtual int getFontHeight() const;
+ virtual int getMaxCharWidth() const;
+ virtual int getCharWidth(uint32 chr) const;
+ virtual void drawChar(Surface *dst, uint32 chr, int x, int y, uint32 color) const;
+
+ bool loadFont(Common::SeekableReadStream &stream);
+
+private:
+ // FONT/NFNT
+ uint16 _fontType;
+ uint16 _firstChar;
+ uint16 _lastChar;
+ uint16 _maxWidth;
+ int16 _kernMax;
+ int16 _nDescent;
+ uint16 _fRectWidth;
+ uint16 _fRectHeight;
+ uint32 _owTLoc;
+ uint16 _ascent;
+ uint16 _descent;
+ uint16 _leading;
+ uint16 _rowWords;
byte *_bitImage;