Module: wine Branch: master Commit: 996126b2deccaad8c61f5d72d9c322fb7fb56a9a URL: https://source.winehq.org/git/wine.git/?a=commit;h=996126b2deccaad8c61f5d72d...
Author: Hugh McMaster hugh.mcmaster@outlook.com Date: Tue Nov 23 22:14:08 2021 +1100
conhost: Only use the maximum character width if a double-byte character set is in use.
Signed-off-by: Hugh McMaster hugh.mcmaster@outlook.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
programs/conhost/window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/programs/conhost/window.c b/programs/conhost/window.c index 319463537d5..7ad0d48effd 100644 --- a/programs/conhost/window.c +++ b/programs/conhost/window.c @@ -646,7 +646,7 @@ static HFONT select_font_config( struct console_config *config, unsigned int cp, lstrcpyW( config->face_name, lf->lfFaceName );
/* FIXME: use maximum width for DBCS codepages since some chars take two cells */ - if (GetCPInfo( cp, &cpinfo ) && cpinfo.MaxCharSize > 1) + if (GetCPInfo( cp, &cpinfo ) && cpinfo.MaxCharSize == 2) config->cell_width = tm.tmMaxCharWidth;
return font; @@ -713,7 +713,7 @@ static BOOL set_console_font( struct console *console, const LOGFONTW *logfont ) memcpy( font_info->face_name, logfont->lfFaceName, font_info->face_len * sizeof(WCHAR) );
/* FIXME: use maximum width for DBCS codepages since some chars take two cells */ - if (GetCPInfo( console->output_cp, &cpinfo ) && cpinfo.MaxCharSize > 1) + if (GetCPInfo( console->output_cp, &cpinfo ) && cpinfo.MaxCharSize == 2) font_info->width = tm.tmMaxCharWidth;
if (console->window->font) DeleteObject( console->window->font );