aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2008-06-24 07:01:27 +0000
committerKenichi Handa2008-06-24 07:01:27 +0000
commit2641e21320c3bcbe7068aee246b8fca4ffef21c4 (patch)
treeb0e3c1b1ff9bfbf2adb9cb4f2500e41761c95233 /src
parentaee08080a29cd480e3e33366fb1570fb321653f5 (diff)
downloademacs-2641e21320c3bcbe7068aee246b8fca4ffef21c4.tar.gz
emacs-2641e21320c3bcbe7068aee246b8fca4ffef21c4.zip
(font_score): Even if the PIXEL_SIZE is the same, check
DPI too. (font_sort_entites): Setup prefer_prop[FONT_DPI_INDEX] too.
Diffstat (limited to 'src')
-rw-r--r--src/font.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/font.c b/src/font.c
index b49fde8cb7e..4d8c9725844 100644
--- a/src/font.c
+++ b/src/font.c
@@ -2212,8 +2212,7 @@ font_score (entity, spec_prop)
2212 2212
2213 /* Score the size. Maximum difference is 127. */ 2213 /* Score the size. Maximum difference is 127. */
2214 i = FONT_SIZE_INDEX; 2214 i = FONT_SIZE_INDEX;
2215 if (! NILP (spec_prop[i]) && ! EQ (AREF (entity, i), spec_prop[i]) 2215 if (! NILP (spec_prop[i]) && XINT (AREF (entity, i)) > 0)
2216 && XINT (AREF (entity, i)) > 0)
2217 { 2216 {
2218 /* We use the higher 6-bit for the actual size difference. The 2217 /* We use the higher 6-bit for the actual size difference. The
2219 lowest bit is set if the DPI is different. */ 2218 lowest bit is set if the DPI is different. */
@@ -2278,7 +2277,7 @@ font_sort_entites (vec, prefer, frame, spec, best_only)
2278 if (len <= 1) 2277 if (len <= 1)
2279 return best_only ? AREF (vec, 0) : vec; 2278 return best_only ? AREF (vec, 0) : vec;
2280 2279
2281 for (i = FONT_WEIGHT_INDEX; i <= FONT_SIZE_INDEX; i++) 2280 for (i = FONT_WEIGHT_INDEX; i <= FONT_DPI_INDEX; i++)
2282 prefer_prop[i] = AREF (prefer, i); 2281 prefer_prop[i] = AREF (prefer, i);
2283 2282
2284 if (! NILP (spec)) 2283 if (! NILP (spec))