changeset 98581:bd9b20fa24a6

(font_delete_unmatched): Fix previous change. Don't reject an entity if DPI and AVGWIDTH of an entity are 0.
author Kenichi Handa <handa@m17n.org>
date Thu, 09 Oct 2008 12:12:33 +0000
parents 93f43f5f3723
children 13af2a2ff3db
files src/font.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/font.c	Thu Oct 09 08:26:33 2008 +0000
+++ b/src/font.c	Thu Oct 09 12:12:33 2008 +0000
@@ -2665,11 +2665,13 @@
       if (prop < FONT_SPEC_MAX
 	  && INTEGERP (AREF (spec, FONT_DPI_INDEX))
 	  && INTEGERP (AREF (entity, FONT_DPI_INDEX))
+	  && XINT (AREF (entity, FONT_DPI_INDEX)) != 0
 	  && ! EQ (AREF (spec, FONT_DPI_INDEX), AREF (entity, FONT_DPI_INDEX)))
 	prop = FONT_SPEC_MAX;
       if (prop < FONT_SPEC_MAX
 	  && INTEGERP (AREF (spec, FONT_AVGWIDTH_INDEX))
 	  && INTEGERP (AREF (entity, FONT_AVGWIDTH_INDEX))
+	  && XINT (AREF (entity, FONT_AVGWIDTH_INDEX)) != 0
 	  && ! EQ (AREF (spec, FONT_AVGWIDTH_INDEX),
 		   AREF (entity, FONT_AVGWIDTH_INDEX)))
 	prop = FONT_SPEC_MAX;