diff options
author | Eugene Sandulenko | 2017-01-21 23:45:59 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2017-01-21 23:46:21 +0100 |
commit | 8a476715f6a733a0d6aa765204e87547725c243e (patch) | |
tree | 0a91293d23a6349d93bb36176237701ff2b76d5d /graphics | |
parent | 257601bdbf0b7394b450073958cd6babaa29baed (diff) | |
download | scummvm-rg350-8a476715f6a733a0d6aa765204e87547725c243e.tar.gz scummvm-rg350-8a476715f6a733a0d6aa765204e87547725c243e.tar.bz2 scummvm-rg350-8a476715f6a733a0d6aa765204e87547725c243e.zip |
GRAPHICS: More work on MacFont scaling
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/fonts/macfont.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/graphics/fonts/macfont.cpp b/graphics/fonts/macfont.cpp index 0f057a8321..f20b64eb63 100644 --- a/graphics/fonts/macfont.cpp +++ b/graphics/fonts/macfont.cpp @@ -419,7 +419,6 @@ MacFONTFont *MacFONTFont::scaleFont(MacFONTFont *src, int newSize) { data._ascent = (int)((float)src->_data._ascent * scale); data._descent = (int)((float)src->_data._descent * scale); data._leading = (int)((float)src->_data._leading * scale); - data._rowWords = (int)((float)src->_data._rowWords * scale); data._family = src->_data._family; data._size = src->_data._size; @@ -438,14 +437,10 @@ MacFONTFont *MacFONTFont::scaleFont(MacFONTFont *src, int newSize) { 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]; + data._rowWords = newBitmapWidth; - //glyph->bitmapOffset = bitmapOffsets[i]; - //glyph->bitmapWidth = bitmapOffsets[i + 1] - bitmapOffsets[i]; - glyph->width = (int)((float)src->_data._glyphs[i].width * scale); - glyph->kerningOffset = (int)((float)src->_data._glyphs[i].kerningOffset * scale); - } + uint16 bitImageSize = data._rowWords * _data._fRectHeight; + _data._bitImage = new byte[bitImageSize]; #if 0 for (int i = 0; i < data.numCharacters; i++) { |