(font_unparse_fcname): Pay attention to the case that
authorKenichi Handa <handa@m17n.org>
Fri, 27 Oct 2006 07:37:13 +0000 (07:37 +0000)
committerKenichi Handa <handa@m17n.org>
Fri, 27 Oct 2006 07:37:13 +0000 (07:37 +0000)
some of font property is a null string.

src/font.c

index 505a91d..b1bdd10 100644 (file)
@@ -1324,7 +1324,7 @@ font_unparse_fcname (font, pixel_size, name, nbytes)
     p += sprintf (p, ":foundry=%s",
                  SDATA (SYMBOL_NAME (AREF (font, FONT_FOUNDRY_INDEX))));
   for (i = 0; i < 3; i++)
-    if (! NILP (styles [i]))
+    if (SYMBOLP (styles[i]) && ! NILP (styles [i]))
       p += sprintf (p, ":%s=%s", style_names[i],
                    SDATA (SYMBOL_NAME (styles [i])));
   if (dpi >= 0)