aboutsummaryrefslogtreecommitdiff
path: root/engines/toon/font.cpp
diff options
context:
space:
mode:
authorvanfanel2015-11-11 17:56:12 +0100
committervanfanel2015-11-11 17:56:12 +0100
commit99739a13fe844c807d3cdd87e67e207e888fd48a (patch)
tree6afbf4763326277efbf528f0bb9e587bf7a01788 /engines/toon/font.cpp
parent37e157a11c3fc731dfdcf6ec6b6a5a448550219b (diff)
parent7e44493fe8877a3c6a65f83b9ed84a5f59169005 (diff)
downloadscummvm-rg350-99739a13fe844c807d3cdd87e67e207e888fd48a.tar.gz
scummvm-rg350-99739a13fe844c807d3cdd87e67e207e888fd48a.tar.bz2
scummvm-rg350-99739a13fe844c807d3cdd87e67e207e888fd48a.zip
Merge branch 'master' into dispmanx
Diffstat (limited to 'engines/toon/font.cpp')
-rw-r--r--engines/toon/font.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/toon/font.cpp b/engines/toon/font.cpp
index ab941e5de9..9b08e432fc 100644
--- a/engines/toon/font.cpp
+++ b/engines/toon/font.cpp
@@ -99,7 +99,7 @@ void FontRenderer::renderText(int16 x, int16 y, const Common::String &origText,
} else {
curChar = textToFont(curChar);
_currentFont->drawFontFrame(_vm->getMainSurface(), curChar, curX, curY, _currentFontColor);
- curX = curX + _currentFont->getFrameWidth(curChar) - 1;
+ curX = curX + MAX<int32>(_currentFont->getFrameWidth(curChar) - 2, 0);
height = MAX<int32>(height, _currentFont->getFrameHeight(curChar));
}
text++;
@@ -138,8 +138,8 @@ void FontRenderer::computeSize(const Common::String &origText, int16 *retX, int1
// really tell how far it will stick out. For now,
// assume we only need to take the lower bound into
// consideration.
- Common::Rect charRect = _currentFont->getFrameRect(curChar);
- lastLineHeight = MAX(lastLineHeight, charRect.bottom);
+ //Common::Rect charRect = _currentFont->getFrameRect(curChar);
+ lastLineHeight = MAX(lastLineHeight, _currentFont->getHeight());
}
text++;
}