summaryrefslogtreecommitdiff
path: root/src/w32font.c
diff options
context:
space:
mode:
authorJason Rumney <jasonr@gnu.org>2008-12-10 16:10:36 +0000
committerJason Rumney <jasonr@gnu.org>2008-12-10 16:10:36 +0000
commit9d32f818993bc689500a27b732fe3318d903a415 (patch)
tree615dbb73b28652ce6505a8b24861d9ede7eee4cc /src/w32font.c
parent174f1c745dcabc9dbd2650b04eccce74ebfe8928 (diff)
downloademacs-9d32f818993bc689500a27b732fe3318d903a415.tar.gz
(add_font_entity_to_list): Limit unicode-sip fonts to those that
contain characters beyond the bmp.
Diffstat (limited to 'src/w32font.c')
-rw-r--r--src/w32font.c7
1 files changed, 5 insertions, 2 deletions
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