[PATCH] gdi32: Dont override FontSubstitutes on a DPI only change
When Overrideing FontSubstitute "MS Shell Dlg", it would reset back to Tahoma on a DPI only change. Skip setting the registry for entries that use the DPI value. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=36010 Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- dlls/gdi32/font.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index 49775b7a806..c990fe5e233 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -2485,7 +2485,8 @@ static void update_codepage(void) add_font_list(hkey, &nls_update_font_list[i], screen_dpi); RegCloseKey(hkey); } - if (!RegCreateKeyW( HKEY_LOCAL_MACHINE, + /* Only update these if the Codepage changed. */ + if (strcmp( buf, cpbuf ) && !RegCreateKeyW( HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows NT\\CurrentVersion\\FontSubstitutes", &hkey )) { RegSetValueExA(hkey, "MS Shell Dlg", 0, REG_SZ, (const BYTE *)nls_update_font_list[i].shelldlg, -- 2.30.2
participants (2)
-
Alistair Leslie-Hughes -
Huw Davies