From: Kenichi Handa Date: Tue, 21 Apr 2009 07:30:00 +0000 (+0000) Subject: (font_score): Check AVGWIDTH too. X-Git-Tag: emacs-pretest-23.0.93~78 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c0a6070d60e300d1c3d509f4d37f339e001881af;p=emacs.git (font_score): Check AVGWIDTH too. --- diff --git a/src/ChangeLog b/src/ChangeLog index c066489b680..45f93f9b50d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,7 @@ 2009-04-21 Kenichi Handa * 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. diff --git a/src/font.c b/src/font.c index c9f8b3e2d82..95669963c22 100644 --- a/src/font.c +++ b/src/font.c @@ -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]; }