]> git.eshelyaron.com Git - emacs.git/commitdiff
(font_parse_xlfd): Check DPI and AVGWIDTH properties more rigidly.
authorKenichi Handa <handa@m17n.org>
Tue, 28 Jul 2009 02:05:41 +0000 (02:05 +0000)
committerKenichi Handa <handa@m17n.org>
Tue, 28 Jul 2009 02:05:41 +0000 (02:05 +0000)
src/ChangeLog
src/font.c

index 9d7a149b2104ff7e3122a442cbe939979956c894..50cdcd733e89647b7f716d9bf97bbb83c7fb04e7 100644 (file)
@@ -1,3 +1,15 @@
+2009-07-28  Kenichi Handa  <handa@m17n.org>
+
+       * font.c (font_parse_xlfd): Check DPI and AVGWIDTH properties more
+       rigidly.
+
+       * xfont.c (xfont_list_pattern): Don't ignore the return value of
+       font_parse_xlfd.  Check font properties more rigidly.
+
+2009-07-27  Kenichi Handa  <handa@m17n.org>
+
+       * xfaces.c (face_with_height): Call font_clear_prop.
+
 2009-07-26  Chong Yidong  <cyd@stupidchicken.com>
 
        * nsfont.m (nsfont_draw): Revert 2009-07-15 change.
index 6c2311cf236d63a2da5d5620c8d70b5e5605b3b0..8292a6e0354a42601dc2df78b027fb9ac33561fa 100644 (file)
@@ -1139,7 +1139,10 @@ font_parse_xlfd (name, font)
            }
        }
 
-      ASET (font, FONT_DPI_INDEX, INTERN_FIELD (XLFD_RESY_INDEX));
+      val = INTERN_FIELD (XLFD_RESY_INDEX);
+      if (! NILP (val) && ! INTEGERP (val))
+       return -1;
+      ASET (font, FONT_DPI_INDEX, val);
       val = INTERN_FIELD (XLFD_SPACING_INDEX);
       if (! NILP (val))
        {
@@ -1151,8 +1154,10 @@ font_parse_xlfd (name, font)
       p = f[XLFD_AVGWIDTH_INDEX];
       if (*p == '~')
        p++;
-      ASET (font, FONT_AVGWIDTH_INDEX,
-           font_intern_prop (p, f[XLFD_REGISTRY_INDEX] - 1 - p, 0));
+      val = font_intern_prop (p, f[XLFD_REGISTRY_INDEX] - 1 - p, 0);
+      if (! NILP (val) && ! INTEGERP (val))
+       return -1;
+      ASET (font, FONT_AVGWIDTH_INDEX, val);
     }
   else
     {