changeset 100325:c28823ea450a

(add_font_entity_to_list): Limit unicode-sip fonts to those that contain characters beyond the bmp.
author Jason Rumney <jasonr@gnu.org>
date Wed, 10 Dec 2008 16:09:17 +0000
parents fc0ef4117779
children 80d774f2a5f5
files src/w32font.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32font.c	Wed Dec 10 15:37:46 2008 +0000
+++ b/src/w32font.c	Wed Dec 10 16:09:17 2008 +0000
@@ -1403,11 +1403,14 @@
              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