]> git.eshelyaron.com Git - emacs.git/commitdiff
(font_delete_unmatched): Fix previous change. Don't
authorKenichi Handa <handa@m17n.org>
Thu, 9 Oct 2008 12:12:33 +0000 (12:12 +0000)
committerKenichi Handa <handa@m17n.org>
Thu, 9 Oct 2008 12:12:33 +0000 (12:12 +0000)
reject an entity if DPI and AVGWIDTH of an entity are 0.

src/font.c

index fa179d624b5439d1683d71bade8823493a2e26ff..c291d4da364d621f1a16013dd8ed7afced2ea437 100644 (file)
@@ -2665,11 +2665,13 @@ font_delete_unmatched (list, spec, size)
       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;