[PATCH 3/3] conhost: Detect DBCS code pages using lead byte comparison
Alexandre Julliard
julliard at winehq.org
Mon Nov 22 14:41:54 CST 2021
Hugh McMaster <hugh.mcmaster at outlook.com> writes:
> @@ -646,7 +647,8 @@ 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)
> + GetCPInfo( cp, &cpinfo );
> + if (memcmp( cpinfo.LeadByte, lead_bytes, sizeof(cpinfo.LeadByte) ))
> config->cell_width = tm.tmMaxCharWidth;
That seems like a roundabout way of doing it. Wouldn't
cpinfo.MaxCharSize == 2 work as well?
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list