aboutsummaryrefslogtreecommitdiff
path: root/graphics/macgui
diff options
context:
space:
mode:
authorEugene Sandulenko2017-02-04 16:05:01 +0100
committerEugene Sandulenko2017-02-04 16:05:01 +0100
commit906d94a7422eb679f9051ad31c4cad5a83804799 (patch)
tree1115aa0f30a0d95f77ac1135e564ea37c6a4cd41 /graphics/macgui
parent1a4be95aaa3ae8a857a9d3d2b3903b42396b443d (diff)
downloadscummvm-rg350-906d94a7422eb679f9051ad31c4cad5a83804799.tar.gz
scummvm-rg350-906d94a7422eb679f9051ad31c4cad5a83804799.tar.bz2
scummvm-rg350-906d94a7422eb679f9051ad31c4cad5a83804799.zip
GRAPHICS: Enforce font recomputation in MacText
Diffstat (limited to 'graphics/macgui')
-rw-r--r--graphics/macgui/mactext.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index 4c0229218d..2064681874 100644
--- a/graphics/macgui/mactext.cpp
+++ b/graphics/macgui/mactext.cpp
@@ -263,7 +263,7 @@ void MacText::render(int from, int to) {
debugN(4, "%2d ", i);
for (uint j = 0; j < _textLines[i].chunks.size(); j++)
- debugN(4, "[%d] \"%s\"", _textLines[i].chunks[j].fontId, _textLines[i].chunks[j].text.c_str());
+ debugN(4, "[%d (%d)] \"%s\" ", _textLines[i].chunks[j].fontId, _textLines[i].chunks[j].textSlant, _textLines[i].chunks[j].text.c_str());
debug(4, "%s", "");
}
@@ -280,6 +280,9 @@ int MacText::getLineWidth(int line, bool enforce) {
int height = 0;
for (uint i = 0; i < _textLines[line].chunks.size(); i++) {
+ if (enforce)
+ _textLines[line].chunks[i].font = nullptr;
+
if (!_textLines[line].chunks[i].text.empty())
width += _textLines[line].chunks[i].getFont()->getStringWidth(_textLines[line].chunks[i].text);