Mercurial > emacs
comparison src/w32fns.c @ 43207:2dc57fcf62e9
(enum_font_cb2): Don't let charsets unknown to Windows
match each other.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Sat, 09 Feb 2002 01:08:33 +0000 |
parents | 20a21fb23284 |
children | 3df71b933c36 |
comparison
equal
deleted
inserted
replaced
43206:cc9c8c17538f | 43207:2dc57fcf62e9 |
---|---|
7036 | 7036 |
7037 if (!NILP (*(lpef->pattern))) | 7037 if (!NILP (*(lpef->pattern))) |
7038 { | 7038 { |
7039 charset = xlfd_charset_of_font (XSTRING(*(lpef->pattern))->data); | 7039 charset = xlfd_charset_of_font (XSTRING(*(lpef->pattern))->data); |
7040 | 7040 |
7041 /* Ensure that charset is valid for this font. | 7041 /* We already checked charsets above, but DEFAULT_CHARSET |
7042 Continue if invalid in case charset contains a wildcard. */ | 7042 slipped through. So only allow exact matches for DEFAULT_CHARSET. */ |
7043 if (charset | 7043 if (charset |
7044 && (x_to_w32_charset (charset) != lplf->elfLogFont.lfCharSet)) | 7044 && strncmp (charset, "*-*", 3) != 0 |
7045 charset = NULL; | 7045 && lpef->logfont.lfCharSet == DEFAULT_CHARSET |
7046 && strcmp (charset, w32_to_x_charset (DEFAULT_CHARSET)) != 0) | |
7047 return 1; | |
7046 } | 7048 } |
7047 | 7049 |
7048 if (charset) | 7050 if (charset) |
7049 charset_list = Fcons (build_string (charset), Qnil); | 7051 charset_list = Fcons (build_string (charset), Qnil); |
7050 else | 7052 else |