[Scummvm-git-logs] scummvm master -> f4ecdf9144dd4c36f3e0edac5c8f137ccab76bea
bluegr
noreply at scummvm.org
Mon Oct 26 07:30:46 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:
f4ecdf9144 TOON: Fix Hebrew text lifetime during rendering
Commit: f4ecdf9144dd4c36f3e0edac5c8f137ccab76bea
https://github.com/scummvm/scummvm/commit/f4ecdf9144dd4c36f3e0edac5c8f137ccab76bea
Author: Haggai Yaniv (yhaggai at gmail.com)
Date: 2026-10-26T09:30:41+02:00
Commit Message:
TOON: Fix Hebrew text lifetime during rendering
Keep the converted bidirectional text alive until drawing finishes
in both single-line and multiline rendering. Previously, the
renderer used a pointer into a destroyed temporary string,
causing garbled and flickering Hebrew subtitles.
Tested with the GOG edition and Hebrew translation on macOS ARM64.
Confirmed that the opening cinematic subtitles render correctly.
Changed paths:
engines/toon/font.cpp
diff --git a/engines/toon/font.cpp b/engines/toon/font.cpp
index 322b751aaf7..a09605643ed 100644
--- a/engines/toon/font.cpp
+++ b/engines/toon/font.cpp
@@ -115,8 +115,11 @@ void FontRenderer::renderText(int16 x, int16 y, const Common::String &origText,
const byte *text = (const byte *)origText.c_str();
- if (_vm->_language == Common::HE_ISR)
- text = (const byte *)Common::convertBiDiString((const char *) text, Common::kWindows1255).c_str();
+ Common::String visualText;
+ if (_vm->_language == Common::HE_ISR) {
+ visualText = Common::convertBiDiString((const char *)text, Common::kWindows1255);
+ text = (const byte *)visualText.c_str();
+ }
while (*text) {
byte curChar = *text;
@@ -328,8 +331,11 @@ void FontRenderer::renderMultiLineText(int16 x, int16 y, const Common::String &o
for (int32 i = 0; i < numLines; i++) {
const byte *line = lines[i];
- if (_vm->_language == Common::HE_ISR)
- line = (const byte *)Common::convertBiDiString((const char *) line, Common::kWindows1255).c_str();
+ Common::String visualText;
+ if (_vm->_language == Common::HE_ISR) {
+ visualText = Common::convertBiDiString((const char *)line, Common::kWindows1255);
+ line = (const byte *)visualText.c_str();
+ }
curX = x - lineSize[i] / 2;
_vm->addDirtyRect(curX + _vm->state()->_currentScrollValue, curY, curX + lineSize[i] + _vm->state()->_currentScrollValue + 2, curY + height);
More information about the Scummvm-git-logs
mailing list