]> git.eshelyaron.com Git - emacs.git/commitdiff
(add_font_entity_to_list): Limit unicode-sip fonts to those that
authorJason Rumney <jasonr@gnu.org>
Wed, 10 Dec 2008 16:10:36 +0000 (16:10 +0000)
committerJason Rumney <jasonr@gnu.org>
Wed, 10 Dec 2008 16:10:36 +0000 (16:10 +0000)
contain characters beyond the bmp.

src/ChangeLog
src/w32font.c

index 5b611cdbbe79c866b6958a046de8f399fd720df5..3f4eafa2c36256c95439d77d691b0c8dc0498d21 100644 (file)
@@ -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  <handa@m17n.org>
 
 
        * charset.c (Fdefine_charset_internal): Setup charset.fast_map
        correctly.
-
 2008-02-01  Dave Love  <fx@gnu.org>
 
        * fns.c (Flanginfo): Call synchronize_system_time_locale.
index 2a4dcb4ac5cd9593693e38124b31fc14b97a9ea7..65e6c5448a616dd15c3691773c16ffc8dccd7458 100644 (file)
@@ -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