[Scummvm-git-logs] scummvm master -> c17d0ab67b33a9ff70938dd7d4a38d811cd664cb
aquadran
noreply at scummvm.org
Sat Aug 1 17:18:02 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:
c17d0ab67b WINTERMUTE: Add temporary W/A until max char height is fixed
Commit: c17d0ab67b33a9ff70938dd7d4a38d811cd664cb
https://github.com/scummvm/scummvm/commit/c17d0ab67b33a9ff70938dd7d4a38d811cd664cb
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2026-08-01T19:17:48+02:00
Commit Message:
WINTERMUTE: Add temporary W/A until max char height is fixed
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 3d74e2f6aee..222bb37e2bf 100644
--- a/engines/wintermute/base/font/base_font_truetype.cpp
+++ b/engines/wintermute/base/font/base_font_truetype.cpp
@@ -250,7 +250,7 @@ BaseSurface *BaseFontTT::renderTextToTexture(const WideString &text, int width,
* is used anyway as line distance, so checking the "textHeight" for sanity is not a bad idea.
*
*/
- int32 textHeight = lines.size() * (_font->getFontHeight() + _font->getFontAscent());
+ int32 textHeight = lines.size() * (_lineHeight + _font->getFontAscent());
if (heightAfterWrapping > textHeight) {
_game->LOG(0, "Strange font definitions. Text height %d smaller than line height %d.", textHeight, heightAfterWrapping);
textHeight = heightAfterWrapping;
@@ -765,7 +765,9 @@ int32 BaseFontTT::wrapText(const WideString &text, int32 maxWidth, int32 maxHeig
* i.e. do not add it to the text line list, return immediately
*/
if (maxHeight >= 0 && (lines.size() + 1) * getLineHeight() > maxHeight) {
- break;
+ // FIXME: font height can be bigger, do not exit if one line
+ if (lines.size() != 0)
+ break;
}
WideString line = text.substr(lineStartIndex, breakPoint - lineStartIndex);
More information about the Scummvm-git-logs
mailing list