changeset 91337:8a5868a05083

*** empty log message ***
author Kenichi Handa <handa@m17n.org>
date Mon, 14 Jan 2008 01:33:02 +0000
parents 04716f23ac87
children cf1f728facf2
files src/font.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/font.c	Mon Jan 14 01:31:25 2008 +0000
+++ b/src/font.c	Mon Jan 14 01:33:02 2008 +0000
@@ -2699,7 +2699,7 @@
 
       if (result > 0)
 	return AREF (entities, i);
-      if (result <= 0)
+      if (result == 0)
 	continue;
       font_object = font_open_for_lface (f, AREF (entities, i), lface, spec);
       if (NILP (font_object))
@@ -3577,9 +3577,12 @@
       for (i = 0; i < len; i++)
 	{
 	  Lisp_Object g = LGSTRING_GLYPH (gstring, i);
-	  unsigned code = LGLYPH_CODE (g);
+	  unsigned code;
 	  struct font_metrics metrics;
 
+	  if (NILP (g))
+	    break;
+	  code = LGLYPH_CODE (g);
 	  if (font->driver->text_extents (font, &code, 1, &metrics) == 0)
 	    {
 	      Lisp_Object gstr = Ffont_make_gstring (font_object,