changeset 91360:203e06d5def6

(font_find_for_lface): Fix previous change. Be sure to close a font-object. (Ffont_shape_text): If FONT_OBJECT is not a font-object, just return TO.
author Kenichi Handa <handa@m17n.org>
date Mon, 28 Jan 2008 23:59:56 +0000
parents 259402c3ba6a
children 8f9e583cc04f
files src/font.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/font.c	Mon Jan 28 07:12:03 2008 +0000
+++ b/src/font.c	Mon Jan 28 23:59:56 2008 +0000
@@ -2703,6 +2703,7 @@
   if (NILP (val))
     return Qnil;
   result = font_has_char (f, val, c);
+  font_close_object (f, val);
   if (result > 0)
     return val;
   return Qnil;
@@ -3566,6 +3567,9 @@
 	args_out_of_range_3 (string, from, to);
     }
 
+  if (! FONT_OBJECT_P (font_object))
+    return to;
+
   CHECK_FONT_GET_OBJECT (font_object, font);
   len = end - start;
   gstring = Ffont_make_gstring (font_object, make_number (len));