From 9fa828240d621736a61f5938f78cc98805fdcf56 Mon Sep 17 00:00:00 2001 From: Damyan Pepper Date: Wed, 13 Oct 2010 16:07:28 +0200 Subject: Fix handling of font properties on Windows (bug#6303). * src/font.c (font_filter_properties): New function, refactored from ftfont_filter_properties. * src/font.h (font_filter_properties): Declare. * src/ftfont.c (ftfont_filter_properties): Use font_filter_properties. * src/w32font.c (w32font_booleans, w32font_non_booleans): New variables. (w32font_filter_properties): New function. (w32font_driver): Add w32font_filter_properties. --- src/w32font.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'src/w32font.c') diff --git a/src/w32font.c b/src/w32font.c index a07762e970..e38e1a56fb 100644 --- a/src/w32font.c +++ b/src/w32font.c @@ -2446,6 +2446,25 @@ in the font selection dialog. */) return DECODE_SYSTEM (build_string (buf)); } +static const char *w32font_booleans [] = { + NULL, +}; + +static const char *w32font_non_booleans [] = { + ":script", + ":antialias", + ":style", + NULL, +}; + +static void +w32font_filter_properties (font, alist) + Lisp_Object font; + Lisp_Object alist; +{ + font_filter_properties (font, alist, w32font_booleans, w32font_non_booleans); +} + struct font_driver w32font_driver = { 0, /* Qgdi */ @@ -2475,7 +2494,7 @@ struct font_driver w32font_driver = NULL, /* shape */ NULL, /* check */ NULL, /* get_variation_glyphs */ - NULL, /* filter_properties */ + w32font_filter_properties, }; -- cgit v1.2.3