From: Jason Rumney Date: Fri, 9 Jan 2009 18:32:21 +0000 (+0000) Subject: (add_font_entity_to_list): Don't report unknown X-Git-Tag: emacs-pretest-23.0.90~581 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4624b6e34c382721eb71d34881d28aba537faa91;p=emacs.git (add_font_entity_to_list): Don't report unknown Windows charset as any unrecognized registry. (Bug#1548) Only report Unicode Plane 2 fonts as unicode-sip. --- diff --git a/src/ChangeLog b/src/ChangeLog index 362cf9c51cd..0cd7e35fb6b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2009-01-09 Jason Rumney + + * w32font.c (add_font_entity_to_list): Don't report unknown + Windows charset as any unrecognized registry. (Bug#1548) + Only report Unicode Plane 2 fonts as unicode-sip. + 2009-01-09 Chong Yidong * xfaces.c (Fx_font_family_list): Function deleted. Compatibility diff --git a/src/w32font.c b/src/w32font.c index caea03b856d..922a377f826 100644 --- a/src/w32font.c +++ b/src/w32font.c @@ -1439,19 +1439,17 @@ add_font_entity_to_list (logical_font, physical_font, font_type, lParam) /* unicode-sip fonts must contain characters beyond the BMP, so look for bit 57 (surrogates) in the Unicode subranges. */ else if (EQ (spec_charset, Qunicode_sip) - && !(physical_font->ntmFontSig.fsUsb[1] & 0x02000000)) + && (!(physical_font->ntmFontSig.fsUsb[1] & 0x02000000) + || !(physical_font->ntmFontSig.fsUsb[1] & 0x28000000))) return 1; /* If registry was specified, but did not map to a windows - charset, only report fonts that have unknown charsets. - This will still report fonts that don't match, but at - least it eliminates known definite mismatches. */ + charset, don't report any fonts. */ else if (!NILP (spec_charset) && !EQ (spec_charset, Qiso10646_1) && !EQ (spec_charset, Qunicode_bmp) && !EQ (spec_charset, Qunicode_sip) - && match_data->pattern.lfCharSet == DEFAULT_CHARSET - && logical_font->elfLogFont.lfCharSet != DEFAULT_CHARSET) - return 1; + && match_data->pattern.lfCharSet == DEFAULT_CHARSET) + return 0; /* If registry was specified, ensure it is reported as the same. */ if (!NILP (spec_charset)) @@ -1488,7 +1486,7 @@ add_one_font_entity_to_list (logical_font, physical_font, font_type, lParam) add_font_entity_to_list (logical_font, physical_font, font_type, lParam); /* If we have a font in the list, terminate the search. */ - return !NILP (match_data->list); + return NILP (match_data->list); } /* Old function to convert from x to w32 charset, from w32fns.c. */