]> git.eshelyaron.com Git - emacs.git/commitdiff
(font_find_for_lface): Fix previous change. Be sure to
authorKenichi Handa <handa@m17n.org>
Mon, 28 Jan 2008 23:59:56 +0000 (23:59 +0000)
committerKenichi Handa <handa@m17n.org>
Mon, 28 Jan 2008 23:59:56 +0000 (23:59 +0000)
close a font-object.
(Ffont_shape_text): If FONT_OBJECT is not a font-object, just
return TO.

src/font.c

index b911ac130302c5f655832a2da93d8eb2b902d0fc..691f8bc1282ef26147ad8d286c348e67bd4e4bcb 100644 (file)
@@ -2703,6 +2703,7 @@ font_find_for_lface (f, lface, spec, c)
   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 @@ FONT-OBJECT.  */)
        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));