]> git.eshelyaron.com Git - emacs.git/commitdiff
(font_score): Check AVGWIDTH too.
authorKenichi Handa <handa@m17n.org>
Tue, 21 Apr 2009 07:30:00 +0000 (07:30 +0000)
committerKenichi Handa <handa@m17n.org>
Tue, 21 Apr 2009 07:30:00 +0000 (07:30 +0000)
src/ChangeLog
src/font.c

index c066489b680e22c5abe72a7df087fcfabfe1ebae..45f93f9b50d0616e1f60b2985849abda3010cb51 100644 (file)
@@ -1,6 +1,7 @@
 2009-04-21  Kenichi Handa  <handa@m17n.org>
 
        * font.c (font_load_for_lface): Cancel previous change.
+       (font_score): Check AVGWIDTH too.
 
        * coding.c (decode_coding_utf_16): Reduce charbuf_end for the
        worst case.
index c9f8b3e2d82db82057f7153a5cbe17bf51e7606e..95669963c228ff5fdce582c5fee197f3ace9f39c 100644 (file)
@@ -2270,6 +2270,9 @@ font_score (entity, spec_prop)
       if (! NILP (spec_prop[FONT_DPI_INDEX])
          && ! EQ (spec_prop[FONT_DPI_INDEX], AREF (entity, FONT_DPI_INDEX)))
        diff |= 1;
+      if (! NILP (spec_prop[FONT_AVGWIDTH_INDEX])
+         && ! EQ (spec_prop[FONT_AVGWIDTH_INDEX], AREF (entity, FONT_AVGWIDTH_INDEX)))
+       diff |= 1;
       score |= min (diff, 127) << sort_shift_bits[FONT_SIZE_INDEX];
     }