restrict font fallback to legacy Windows console

It was misbehaving with ENHANCED_SYMBOLS so restrict the font fallback
to the legacy Windows console for now.
This commit is contained in:
nhmall
2024-05-12 08:12:30 -04:00
parent 329ffae7df
commit 97916007ef
+10 -6
View File
@@ -2097,16 +2097,20 @@ static int CALLBACK EnumFontCallback(
void void
check_and_set_font(void) check_and_set_font(void)
{ {
#ifndef VIRTUAL_TERMINAL_SEQUENCES
if (!check_font_widths()) { if (!check_font_widths()) {
const char *msg = "WARNING: glyphs too wide in console font." if (wizard) {
" Changing code page to 437 and font to Consolas"; const char *msg = "WARNING: glyphs too wide in console font."
" Changing code page to 437 and font to Consolas";
if (iflags.window_inited) if (iflags.window_inited)
pline ("%s", msg); pline ("%s", msg);
else else
raw_printf("%s\n", msg); raw_printf("%s\n", msg);
}
set_known_good_console_font(); set_known_good_console_font();
} }
#endif
} }
/* check_font_widths returns TRUE if all glyphs in current console font /* check_font_widths returns TRUE if all glyphs in current console font