[Scummvm-git-logs] scummvm master -> bcd9900edf7ddac7783489cce7293f812bbaeb95
aquadran
noreply at scummvm.org
Sat Aug 1 17:58:32 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
bcd9900edf WINTERMUTE: Calculate height based on orignal WME code
Commit: bcd9900edf7ddac7783489cce7293f812bbaeb95
https://github.com/scummvm/scummvm/commit/bcd9900edf7ddac7783489cce7293f812bbaeb95
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2026-08-01T19:58:18+02:00
Commit Message:
WINTERMUTE: Calculate height based on orignal WME code
Changed paths:
engines/wintermute/base/font/base_font_truetype.cpp
diff --git a/engines/wintermute/base/font/base_font_truetype.cpp b/engines/wintermute/base/font/base_font_truetype.cpp
index 222bb37e2bf..811a67b87dd 100644
--- a/engines/wintermute/base/font/base_font_truetype.cpp
+++ b/engines/wintermute/base/font/base_font_truetype.cpp
@@ -680,7 +680,8 @@ bool BaseFontTT::initFont() {
_font = _fallbackFont = FontMan.getFontByUsage(Graphics::FontManager::kBigGUIFont);
warning("BaseFontTT::InitFont - Couldn't load font: %s", _fontFile);
}
- _lineHeight = _font->getFontHeight();
+ auto box = _font->getBoundingBox("Ay");
+ _lineHeight = box.bottom - box.top;
#ifdef ENABLE_FOXTAIL
if (BaseEngine::instance().isFoxTail(FOXTAIL_1_2_896, FOXTAIL_LATEST_VERSION)) {
_lineHeight -= 1;
@@ -764,10 +765,8 @@ int32 BaseFontTT::wrapText(const WideString &text, int32 maxWidth, int32 maxHeig
/* max. height exceeded --> "discard" this line and all following text
* i.e. do not add it to the text line list, return immediately
*/
- if (maxHeight >= 0 && (lines.size() + 1) * getLineHeight() > maxHeight) {
- // FIXME: font height can be bigger, do not exit if one line
- if (lines.size() != 0)
- break;
+ if (maxHeight >= 0 && ((int32)lines.size() + 1) * getLineHeight() > maxHeight) {
+ break;
}
WideString line = text.substr(lineStartIndex, breakPoint - lineStartIndex);
More information about the Scummvm-git-logs
mailing list