From: Jason Rumney Date: Wed, 10 Dec 2008 16:10:36 +0000 (+0000) Subject: (add_font_entity_to_list): Limit unicode-sip fonts to those that X-Git-Tag: emacs-pretest-23.0.90~1180 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9d32f818993bc689500a27b732fe3318d903a415;p=emacs.git (add_font_entity_to_list): Limit unicode-sip fonts to those that contain characters beyond the bmp. --- diff --git a/src/ChangeLog b/src/ChangeLog index 5b611cdbbe7..3f4eafa2c36 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,8 @@ * w32font.c (Qcham): New symbol. (font_supported_scripts): Add cham, and comments for other new scripts in bitfield from OpenType spec. + (add_font_entity_to_list): Limit unicode-sip fonts to those that + contain characters beyond the bmp. 2008-12-10 Kenichi Handa @@ -11179,7 +11181,6 @@ * charset.c (Fdefine_charset_internal): Setup charset.fast_map correctly. - 2008-02-01 Dave Love * fns.c (Flanginfo): Call synchronize_system_time_locale. diff --git a/src/w32font.c b/src/w32font.c index 2a4dcb4ac5c..65e6c5448a6 100644 --- a/src/w32font.c +++ b/src/w32font.c @@ -1403,11 +1403,14 @@ add_font_entity_to_list (logical_font, physical_font, font_type, lParam) ANSI and DEFAULT charsets, as most unicode fonts will contain one of those plus others. */ if ((EQ (spec_charset, Qiso10646_1) - || EQ (spec_charset, Qunicode_bmp) - || EQ (spec_charset, Qunicode_sip)) + || EQ (spec_charset, Qunicode_bmp)) && logical_font->elfLogFont.lfCharSet != DEFAULT_CHARSET && logical_font->elfLogFont.lfCharSet != ANSI_CHARSET) return 1; + /* unicode-sip fonts must contain characters beyond the BMP. */ + else if (EQ (spec_charset, Qunicode_sip) + && !(physical_font->ntmFontSig.fsUsb[1] & 0x02000000)) + 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