[Scummvm-git-logs] scummvm master -> 480f340598b22f5571da233af34c2f762ad26b93

OMGPizzaGuy noreply at scummvm.org
Sat May 24 22:03:48 UTC 2025


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:
480f340598 ULTIMA8: Fix use of encoding tables for font replacement.


Commit: 480f340598b22f5571da233af34c2f762ad26b93
    https://github.com/scummvm/scummvm/commit/480f340598b22f5571da233af34c2f762ad26b93
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2025-05-24T16:58:37-05:00

Commit Message:
ULTIMA8: Fix use of encoding tables for font replacement.
Fixes #15342

Changed paths:
    engines/ultima/ultima8/gfx/fonts/tt_font.cpp


diff --git a/engines/ultima/ultima8/gfx/fonts/tt_font.cpp b/engines/ultima/ultima8/gfx/fonts/tt_font.cpp
index 96a79786c7f..711bc2b0c66 100644
--- a/engines/ultima/ultima8/gfx/fonts/tt_font.cpp
+++ b/engines/ultima/ultima8/gfx/fonts/tt_font.cpp
@@ -78,9 +78,14 @@ static Common::U32String toUnicode(const Std::string &text, uint16 bullet) {
 	Std::string::size_type len = T::length(text);
 	Common::U32String result = Common::U32String(text.c_str(), len);
 
-	for (uint idx = 0; idx < result.size(); ++idx) {
-		if (result[idx] == '@')
+	Std::string::const_iterator iter = text.begin();
+	for (uint idx = 0; idx < len; ++idx) {
+		uint32 u = T::unicode(iter);
+		if (u == '@') {
 			result.setChar(bullet, idx);
+		} else {
+			result.setChar(u, idx);
+		}
 	}
 
 	return result;




More information about the Scummvm-git-logs mailing list