aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2009-04-21 07:30:00 +0000
committerKenichi Handa2009-04-21 07:30:00 +0000
commitc0a6070d60e300d1c3d509f4d37f339e001881af (patch)
tree49934bbd650834e40099d045c157bf1ededdc875 /src
parent19a4c5043a12fc81530d10544715283f6073e402 (diff)
downloademacs-c0a6070d60e300d1c3d509f4d37f339e001881af.tar.gz
emacs-c0a6070d60e300d1c3d509f4d37f339e001881af.zip
(font_score): Check AVGWIDTH too.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog1
-rw-r--r--src/font.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index c066489b680..45f93f9b50d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,6 +1,7 @@
12009-04-21 Kenichi Handa <handa@m17n.org> 12009-04-21 Kenichi Handa <handa@m17n.org>
2 2
3 * font.c (font_load_for_lface): Cancel previous change. 3 * font.c (font_load_for_lface): Cancel previous change.
4 (font_score): Check AVGWIDTH too.
4 5
5 * coding.c (decode_coding_utf_16): Reduce charbuf_end for the 6 * coding.c (decode_coding_utf_16): Reduce charbuf_end for the
6 worst case. 7 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)
2270 if (! NILP (spec_prop[FONT_DPI_INDEX]) 2270 if (! NILP (spec_prop[FONT_DPI_INDEX])
2271 && ! EQ (spec_prop[FONT_DPI_INDEX], AREF (entity, FONT_DPI_INDEX))) 2271 && ! EQ (spec_prop[FONT_DPI_INDEX], AREF (entity, FONT_DPI_INDEX)))
2272 diff |= 1; 2272 diff |= 1;
2273 if (! NILP (spec_prop[FONT_AVGWIDTH_INDEX])
2274 && ! EQ (spec_prop[FONT_AVGWIDTH_INDEX], AREF (entity, FONT_AVGWIDTH_INDEX)))
2275 diff |= 1;
2273 score |= min (diff, 127) << sort_shift_bits[FONT_SIZE_INDEX]; 2276 score |= min (diff, 127) << sort_shift_bits[FONT_SIZE_INDEX];
2274 } 2277 }
2275 2278