]> code.delx.au - gnu-emacs/commitdiff
(font_unparse_fcname): Increase len when style is a symbol.
authorJason Rumney <jasonr@gnu.org>
Sat, 1 Mar 2008 20:21:03 +0000 (20:21 +0000)
committerJason Rumney <jasonr@gnu.org>
Sat, 1 Mar 2008 20:21:03 +0000 (20:21 +0000)
src/ChangeLog
src/font.c

index 5bc47181e4e0526a5561a6b3ac96da8fbb558061..5d0592479400bef445476d86cab84728b128b179 100644 (file)
@@ -1,3 +1,7 @@
+2008-03-01  Jason Rumney  <jasonr@gnu.org>
+
+       * font.c (font_unparse_fcname): Increase len when style is a symbol.
+
 2008-03-01  Jan Dj\e$(Q)Z\e(Brv  <jan.h.d@swipnet.se>
 
        * xterm.c (handle_one_xevent): For Gtk+ and ConfigureNotify, call
index ce040fe7fd758128ee3e9c7434ec710cde8f541c..9856c935ef6e0ee0aa765d43ae00fb3e7a019dc3 100644 (file)
@@ -1462,9 +1462,10 @@ font_unparse_fcname (font, pixel_size, name, nbytes)
       if (INTEGERP (val))
        {
          val = prop_numeric_to_name (i, XINT (val));
-         len += (strlen (style_names[i - FONT_WEIGHT_INDEX])
-                 + 2 + SBYTES (SYMBOL_NAME (val))); /* :xxx=NAME */
        }
+      if (SYMBOLP (val) && ! NILP (val))
+        len += (strlen (style_names[i - FONT_WEIGHT_INDEX])
+                + 2 + SBYTES (SYMBOL_NAME (val))); /* :xxx=NAME */
       styles[i - FONT_WEIGHT_INDEX] = val;
     }