[Scummvm-git-logs] scummvm master -> 99dca1d33147f23961b228fe17854edcdc21e8c8

aquadran noreply at scummvm.org
Sat Aug 1 17:00:30 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:
99dca1d331 WINTERMUTE: Improved TT font code


Commit: 99dca1d33147f23961b228fe17854edcdc21e8c8
    https://github.com/scummvm/scummvm/commit/99dca1d33147f23961b228fe17854edcdc21e8c8
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2026-08-01T19:00:17+02:00

Commit Message:
WINTERMUTE: Improved TT font 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 ca890b1b6f5..3d74e2f6aee 100644
--- a/engines/wintermute/base/font/base_font_truetype.cpp
+++ b/engines/wintermute/base/font/base_font_truetype.cpp
@@ -250,14 +250,14 @@ 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() * (_lineHeight + _font->getFontAscent());
+	int32 textHeight = lines.size() * (_font->getFontHeight() + _font->getFontAscent());
 	if (heightAfterWrapping > textHeight) {
 		_game->LOG(0, "Strange font definitions. Text height %d smaller than line height %d.", textHeight, heightAfterWrapping);
 		textHeight = heightAfterWrapping;
 	}
 
 	Graphics::Surface *surface = new Graphics::Surface();
-	surface->create((uint16)width, (uint16)(_lineHeight * lines.size()), _game->_renderer->getPixelFormat());
+	surface->create((uint16)width, (uint16)(textHeight), _game->_renderer->getPixelFormat());
 
 	Graphics::TextAlign alignment = Graphics::kTextAlignInvalid;
 	if (align == TAL_LEFT) {




More information about the Scummvm-git-logs mailing list