aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--graphics/fonts/macfont.cpp7
-rw-r--r--graphics/macgui/macfontmanager.cpp1
2 files changed, 6 insertions, 2 deletions
diff --git a/graphics/fonts/macfont.cpp b/graphics/fonts/macfont.cpp
index f20b64eb63..41b5df8b74 100644
--- a/graphics/fonts/macfont.cpp
+++ b/graphics/fonts/macfont.cpp
@@ -86,6 +86,7 @@ MacFontFamily::MacFontFamily() {
_ffNumOffsets = 0;
_ffOffsets = nullptr;
_ffNumBBoxes = 0;
+ _ffNumKerns = 0;
}
MacFontFamily::~MacFontFamily() {
@@ -185,7 +186,7 @@ bool MacFontFamily::load(Common::SeekableReadStream &stream) {
_ffKernEntries[i]._entryLength = stream.readUint16BE();
_ffKernEntries[i]._kernPairs.resize(_ffKernEntries[i]._entryLength);
- debug(10, " style: %x kernpairs: %d", _ffKernEntries[i]._style, _ffKernEntries[i]._entryLength);
+ debug(10, " style: %x kernpairs: %u", _ffKernEntries[i]._style, _ffKernEntries[i]._entryLength);
for (uint j = 0; j < _ffKernEntries[i]._entryLength; j++) {
byte f, s;
@@ -283,7 +284,7 @@ bool MacFONTFont::loadFont(Common::SeekableReadStream &stream, MacFontFamily *fa
_data._glyphs.resize(glyphCount);
// Bit image table
- uint16 bitImageSize = _data._rowWords * _data._fRectHeight;
+ uint bitImageSize = _data._rowWords * _data._fRectHeight;
_data._bitImage = new byte[bitImageSize];
stream.read(_data._bitImage, bitImageSize);
@@ -333,6 +334,8 @@ bool MacFONTFont::loadFont(Common::SeekableReadStream &stream, MacFontFamily *fa
stream.readUint16BE();
}
+ free(bitmapOffsets);
+
return true;
}
diff --git a/graphics/macgui/macfontmanager.cpp b/graphics/macgui/macfontmanager.cpp
index d49f17ce88..0e5bba28e7 100644
--- a/graphics/macgui/macfontmanager.cpp
+++ b/graphics/macgui/macfontmanager.cpp
@@ -215,6 +215,7 @@ void MacFontManager::loadFonts() {
}
delete stream;
+ delete fontFile;
}
_builtInFonts = false;