diff options
author | Juanma Barranquero <lekktu@gmail.com> | 2010-10-14 16:32:27 +0200 |
---|---|---|
committer | Juanma Barranquero <lekktu@gmail.com> | 2010-10-14 16:32:27 +0200 |
commit | ea2fd7b516e71b54ef98054acb32f1086087ae68 (patch) | |
tree | f2b4bb5f2820de18d3d435fba43019624580e42b /src/ftfont.c | |
parent | e904806d87c07d0d992b12c4e453f19bcc481960 (diff) | |
parent | 2e9fce62331798d9effc9b40f3f4b4ed0336a5c7 (diff) | |
download | emacs-ea2fd7b516e71b54ef98054acb32f1086087ae68.tar.gz |
Merge changes from emacs-23 branch.
Diffstat (limited to 'src/ftfont.c')
-rw-r--r-- | src/ftfont.c | 43 |
1 files changed, 4 insertions, 39 deletions
diff --git a/src/ftfont.c b/src/ftfont.c index 97bf265a84c..b0d10791379 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -88,7 +88,7 @@ static Lisp_Object ftfont_lookup_cache (Lisp_Object, enum ftfont_cache_for); static void ftfont_filter_properties (Lisp_Object font, Lisp_Object alist); - + Lisp_Object ftfont_font_format (FcPattern *, Lisp_Object); #define SYMBOL_FcChar8(SYM) (FcChar8 *) SDATA (SYMBOL_NAME (SYM)) @@ -260,7 +260,7 @@ ftfont_pattern_entity (FcPattern *p, Lisp_Object extra) else { /* As this font is not scalable, parhaps this is a BDF or PCF - font. */ + font. */ FT_Face ft_face; ASET (entity, FONT_ADSTYLE_INDEX, get_adstyle_property (p)); @@ -2093,7 +2093,7 @@ ftfont_drive_otf (font, spec, in, from, to, out, adjustment) return to; } -static int +static int ftfont_try_otf (MFLTFont *font, MFLTOtfSpec *spec, MFLTGlyphString *in, int from, int to) { @@ -2645,42 +2645,7 @@ static const char *ftfont_non_booleans [] = { static void ftfont_filter_properties (Lisp_Object font, Lisp_Object alist) { - Lisp_Object it; - int i; - - /* Set boolean values to Qt or Qnil */ - for (i = 0; ftfont_booleans[i] != NULL; ++i) - for (it = alist; ! NILP (it); it = XCDR (it)) - { - Lisp_Object key = XCAR (XCAR (it)); - Lisp_Object val = XCDR (XCAR (it)); - char *keystr = SDATA (SYMBOL_NAME (key)); - - if (strcmp (ftfont_booleans[i], keystr) == 0) - { - const char *str = SYMBOLP (val) ? SDATA (SYMBOL_NAME (val)) : NULL; - if (INTEGERP (val)) str = XINT (val) != 0 ? "true" : "false"; - if (str == NULL) str = "true"; - - val = Qt; - if (strcmp ("false", str) == 0 || strcmp ("False", str) == 0 - || strcmp ("FALSE", str) == 0 || strcmp ("FcFalse", str) == 0 - || strcmp ("off", str) == 0 || strcmp ("OFF", str) == 0 - || strcmp ("Off", str) == 0) - val = Qnil; - Ffont_put (font, key, val); - } - } - - for (i = 0; ftfont_non_booleans[i] != NULL; ++i) - for (it = alist; ! NILP (it); it = XCDR (it)) - { - Lisp_Object key = XCAR (XCAR (it)); - Lisp_Object val = XCDR (XCAR (it)); - char *keystr = SDATA (SYMBOL_NAME (key)); - if (strcmp (ftfont_non_booleans[i], keystr) == 0) - Ffont_put (font, key, val); - } + font_filter_properties (font, alist, ftfont_booleans, ftfont_non_booleans); } |