diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/ftfont.c | 20 |
2 files changed, 18 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index d3ac1b3178..5af18f3887 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-01-28 Kenichi Handa <[email protected]> + + * ftfont.c (ftfont_spec_pattern): Check each extra property + value. + 2011-01-28 Stefan Monnier <[email protected]> * xdisp.c (safe_eval_handler): Distinguish symbols and strings. diff --git a/src/ftfont.c b/src/ftfont.c index 9584422fc0..a20f2013e5 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -749,7 +749,10 @@ ftfont_spec_pattern (Lisp_Object spec, char *otlayout, struct OpenTypeSpec **ots key = XCAR (XCAR (extra)), val = XCDR (XCAR (extra)); if (EQ (key, QCdpi)) - dpi = XINT (val); + { + if (INTEGERP (val)) + dpi = XINT (val); + } else if (EQ (key, QClang)) { if (! langset) @@ -769,12 +772,15 @@ ftfont_spec_pattern (Lisp_Object spec, char *otlayout, struct OpenTypeSpec **ots } else if (EQ (key, QCotf)) { - *otspec = ftfont_get_open_type_spec (val); - if (! *otspec) - return NULL; - strcat (otlayout, "otlayout:"); - OTF_TAG_STR ((*otspec)->script_tag, otlayout + 9); - script = (*otspec)->script; + if (CONSP (val)) + { + *otspec = ftfont_get_open_type_spec (val); + if (! *otspec) + return NULL; + strcat (otlayout, "otlayout:"); + OTF_TAG_STR ((*otspec)->script_tag, otlayout + 9); + script = (*otspec)->script; + } } else if (EQ (key, QCscript)) script = val; |