Commit 644cefdf authored by Jason Rumney's avatar Jason Rumney
Browse files

(enum_font_cb2): Don't let charsets unknown to Windows

match each other.
parent fd4f8b36
...@@ -7038,11 +7038,13 @@ enum_font_cb2 (lplf, lptm, FontType, lpef) ...@@ -7038,11 +7038,13 @@ enum_font_cb2 (lplf, lptm, FontType, lpef)
{ {
charset = xlfd_charset_of_font (XSTRING(*(lpef->pattern))->data); charset = xlfd_charset_of_font (XSTRING(*(lpef->pattern))->data);
/* Ensure that charset is valid for this font. /* We already checked charsets above, but DEFAULT_CHARSET
Continue if invalid in case charset contains a wildcard. */ slipped through. So only allow exact matches for DEFAULT_CHARSET. */
if (charset if (charset
&& (x_to_w32_charset (charset) != lplf->elfLogFont.lfCharSet)) && strncmp (charset, "*-*", 3) != 0
charset = NULL; && lpef->logfont.lfCharSet == DEFAULT_CHARSET
&& strcmp (charset, w32_to_x_charset (DEFAULT_CHARSET)) != 0)
return 1;
} }
if (charset) if (charset)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment