diff options
| author | Jason Rumney | 2002-02-09 01:08:33 +0000 |
|---|---|---|
| committer | Jason Rumney | 2002-02-09 01:08:33 +0000 |
| commit | 644cefdf628a3acbcb60426e536877ea678d0bc6 (patch) | |
| tree | ac69756c6f7f72ba7ac13e4e01446269e033a71f /src | |
| parent | fd4f8b36c6dc379e9271aee381c964fc8aa58f62 (diff) | |
| download | emacs-644cefdf628a3acbcb60426e536877ea678d0bc6.tar.gz emacs-644cefdf628a3acbcb60426e536877ea678d0bc6.zip | |
(enum_font_cb2): Don't let charsets unknown to Windows
match each other.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32fns.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/w32fns.c b/src/w32fns.c index 38de4b47ef4..a269645c241 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -7038,11 +7038,13 @@ enum_font_cb2 (lplf, lptm, FontType, lpef) | |||
| 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) |