# HG changeset patch # User Jason Rumney # Date 1013216913 0 # Node ID 2dc57fcf62e95960a5e8508dbbf5de6f94cd68ac # Parent cc9c8c17538fdb91f25b985c24651a681431bfa9 (enum_font_cb2): Don't let charsets unknown to Windows match each other. diff -r cc9c8c17538f -r 2dc57fcf62e9 src/w32fns.c --- a/src/w32fns.c Sat Feb 09 00:01:10 2002 +0000 +++ b/src/w32fns.c Sat Feb 09 01:08:33 2002 +0000 @@ -7038,11 +7038,13 @@ { charset = xlfd_charset_of_font (XSTRING(*(lpef->pattern))->data); - /* Ensure that charset is valid for this font. - Continue if invalid in case charset contains a wildcard. */ - if (charset - && (x_to_w32_charset (charset) != lplf->elfLogFont.lfCharSet)) - charset = NULL; + /* We already checked charsets above, but DEFAULT_CHARSET + slipped through. So only allow exact matches for DEFAULT_CHARSET. */ + if (charset + && strncmp (charset, "*-*", 3) != 0 + && lpef->logfont.lfCharSet == DEFAULT_CHARSET + && strcmp (charset, w32_to_x_charset (DEFAULT_CHARSET)) != 0) + return 1; } if (charset)