aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32font.c
diff options
context:
space:
mode:
authorJason Rumney <[email protected]>2008-05-29 16:57:00 +0000
committerJason Rumney <[email protected]>2008-05-29 16:57:00 +0000
commitef8e283dd500fa3565915088549b2bc841d21b5f (patch)
tree66e6c41d1c203825a8aba62b33796b90f9271ec9 /src/w32font.c
parent891bd142e24cc64eabde86d038c80dab66e37d36 (diff)
(add_font_entity_to_list): Allow non-opentype truetype fonts back
in the uniscribe backend, but disallow any font that has no unicode subrange support.
Diffstat (limited to 'src/w32font.c')
-rw-r--r--src/w32font.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/w32font.c b/src/w32font.c
index 78f8049d85..7509a79543 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -1321,7 +1321,14 @@ add_font_entity_to_list (logical_font, physical_font, font_type, lParam)
Lisp_Object backend = match_data->opentype_only ? Quniscribe : Qgdi;
if ((!match_data->opentype_only
- || (physical_font->ntmTm.ntmFlags & NTMFLAGS_OPENTYPE))
+ || (((physical_font->ntmTm.ntmFlags & NTMFLAGS_OPENTYPE)
+ || (font_type & TRUETYPE_FONTTYPE))
+ /* For the uniscribe backend, only consider fonts that claim
+ to cover at least some part of Unicode. */
+ && (physical_font->ntmFontSig.fsUsb[3]
+ || physical_font->ntmFontSig.fsUsb[2]
+ || physical_font->ntmFontSig.fsUsb[1]
+ || (physical_font->ntmFontSig.fsUsb[0] & 0x3fffffff))))
&& logfonts_match (&logical_font->elfLogFont, &match_data->pattern)
&& font_matches_spec (font_type, physical_font,
match_data->orig_font_spec, backend,