[Scummvm-git-logs] scummvm master -> e55c254f7a950bab81d99d6ba4250e06d13b370c

sev- noreply at scummvm.org
Sun May 31 11:27:43 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:
e55c254f7a GLK: Fix saved font selection handling


Commit: e55c254f7a950bab81d99d6ba4250e06d13b370c
    https://github.com/scummvm/scummvm/commit/e55c254f7a950bab81d99d6ba4250e06d13b370c
Author: Shadow Maker (shm at vtrd.in)
Date: 2026-05-31T13:27:40+02:00

Commit Message:
GLK: Fix saved font selection handling

The GLK options dialog saved text and grid font choices using tfont_N and gfont_N keys, but the loader and style hint code did not consistently honor those saved per-style keys. As a result, choosing a monospaced text font in the launcher could appear to succeed in the dialog while the game still rendered with the proportional font selected by style hints.

Load the dialog font popups from the already synchronized Conf styles, save font choices with the same tfont_N/gfont_N key format used by Conf::synchronize(), and avoid applying text-buffer proportional style hints over an explicit saved text font. This keeps user-selected monospaced fonts effective after saving options and starting the game.

Changed paths:
    engines/glk/dialogs.cpp
    engines/glk/glk_api.cpp


diff --git a/engines/glk/dialogs.cpp b/engines/glk/dialogs.cpp
index c2916151276..46ec70c3246 100644
--- a/engines/glk/dialogs.cpp
+++ b/engines/glk/dialogs.cpp
@@ -572,12 +572,8 @@ void GlkOptionsWidget::load() {
 		{ _gfontPopUps[0], g_conf->_gStyles, "gfont" }
 	};
 
-	for (auto &opt : fontOptions) {
-		if (g_conf)
-			setFontPopUp(opt.popup, true, opt.styles[style_Normal].font, nullptr, _domain);
-		else
-			setFontPopUp(opt.popup, false, (FACES)0, opt.confKeyPrefix, _domain);
-	}
+	for (auto &opt : fontOptions)
+		setFontPopUp(opt.popup, true, opt.styles[style_Normal].font, nullptr, _domain);
 
 	for (auto &opt : colorOptions) {
 		if (g_conf) {
@@ -892,7 +888,7 @@ static void saveFontPopUp(GUI::PopUpWidget *popup, WindowStyle *styles, const ch
 	FACES selectedFont = (FACES)popup->getSelectedTag();
 	for (int i = 0; i < style_NUMSTYLES; ++i) {
 		styles[i].font = selectedFont;
-		Common::String key = Common::String::format("%s%d", confKeyPrefix, i);
+		Common::String key = Common::String::format("%s_%d", confKeyPrefix, i);
 		ConfMan.set(key, Screen::getFontName(selectedFont), domain);
 	}
 }
diff --git a/engines/glk/glk_api.cpp b/engines/glk/glk_api.cpp
index b4a7a2edc0b..82cfdc5a33a 100644
--- a/engines/glk/glk_api.cpp
+++ b/engines/glk/glk_api.cpp
@@ -480,7 +480,7 @@ void GlkAPI::glk_stylehint_set(uint wintype, uint style, uint hint, int val) {
 		break;
 
 	case stylehint_Proportional:
-		if (wintype == wintype_TextBuffer) {
+		if (wintype == wintype_TextBuffer && !ConfMan.hasKey(Common::String::format("tfont_%u", style))) {
 			p = val > 0;
 			b = styles[style].isBold();
 			i = styles[style].isItalic();




More information about the Scummvm-git-logs mailing list