[Scummvm-git-logs] scummvm master -> 76cfde072296afe783ea9ab24122bb264402812d
sev-
sev at scummvm.org
Fri Jan 20 10:10:55 CET 2017
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
286a74adeb GRAPHICS: Fix copy/paste errors with MacFont size processing
76cfde0722 GRAPHICS: Further work on MacFont font scaling
Commit: 286a74adeb3eb145a22d7081d07ba5b20e8ccebd
https://github.com/scummvm/scummvm/commit/286a74adeb3eb145a22d7081d07ba5b20e8ccebd
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-01-20T08:51:52+01:00
Commit Message:
GRAPHICS: Fix copy/paste errors with MacFont size processing
Changed paths:
graphics/fonts/macfont.cpp
diff --git a/graphics/fonts/macfont.cpp b/graphics/fonts/macfont.cpp
index 9512029..fb3240a 100644
--- a/graphics/fonts/macfont.cpp
+++ b/graphics/fonts/macfont.cpp
@@ -131,10 +131,10 @@ bool MacFontFamily::load(Common::SeekableReadStream &stream) {
for (uint i = 0; i <= _ffNumAssoc; i++) {
_ffAssocEntries[i]._fontSize = stream.readUint16BE(); // point size of font
- _ffAssocEntries[i]._fontSize = stream.readUint16BE(); // style of font
+ _ffAssocEntries[i]._fontStyle = stream.readUint16BE(); // style of font
_ffAssocEntries[i]._fontID = stream.readUint16BE(); // font resource ID
- debug(10, " size: %d style: %d id: %d", _ffAssocEntries[i]._fontSize, _ffAssocEntries[i]._fontSize,
+ debug(10, " size: %d style: %d id: %d", _ffAssocEntries[i]._fontSize, _ffAssocEntries[i]._fontStyle,
_ffAssocEntries[i]._fontID);
}
Commit: 76cfde072296afe783ea9ab24122bb264402812d
https://github.com/scummvm/scummvm/commit/76cfde072296afe783ea9ab24122bb264402812d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-01-20T09:01:01+01:00
Commit Message:
GRAPHICS: Further work on MacFont font scaling
Changed paths:
graphics/fonts/macfont.cpp
diff --git a/graphics/fonts/macfont.cpp b/graphics/fonts/macfont.cpp
index fb3240a..0f057a8 100644
--- a/graphics/fonts/macfont.cpp
+++ b/graphics/fonts/macfont.cpp
@@ -425,6 +425,19 @@ MacFONTFont *MacFONTFont::scaleFont(MacFONTFont *src, int newSize) {
data._size = src->_data._size;
data._style = src->_data._style;
+ // Dtermine width of the bit image table
+ int newBitmapWidth = 0;
+ for (uint i = 0; i < src->_data._glyphs.size() + 1; i++) {
+ MacGlyph *glyph = (i == src->_data._glyphs.size()) ? &_data._defaultChar : &_data._glyphs[i];
+
+ glyph->width = (int)((float)src->_data._glyphs[i].width * scale);
+ glyph->kerningOffset = (int)((float)src->_data._glyphs[i].kerningOffset * scale);
+ glyph->bitmapWidth = (int)((float)src->_data._glyphs[i].bitmapWidth * scale);
+ glyph->bitmapOffset = newBitmapWidth;
+
+ newBitmapWidth += ((glyph->bitmapWidth + 7) / 8);
+ }
+
for (uint i = 0; i < src->_data._glyphs.size() + 1; i++) {
MacGlyph *glyph = (i == src->_data._glyphs.size()) ? &_data._defaultChar : &_data._glyphs[i];
More information about the Scummvm-git-logs
mailing list