changeset 96224:0fdf03fe1e8d

(font_score): Even if the PIXEL_SIZE is the same, check DPI too. (font_sort_entites): Setup prefer_prop[FONT_DPI_INDEX] too.
author Kenichi Handa <handa@m17n.org>
date Tue, 24 Jun 2008 07:01:27 +0000
parents b43a5c7d56b7
children c81ae89820a4
files src/font.c
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/font.c	Tue Jun 24 05:27:35 2008 +0000
+++ b/src/font.c	Tue Jun 24 07:01:27 2008 +0000
@@ -2212,8 +2212,7 @@
 
   /* Score the size.  Maximum difference is 127.  */
   i = FONT_SIZE_INDEX;
-  if (! NILP (spec_prop[i]) && ! EQ (AREF (entity, i), spec_prop[i])
-      && XINT (AREF (entity, i)) > 0)
+  if (! NILP (spec_prop[i]) && XINT (AREF (entity, i)) > 0)
     {
       /* We use the higher 6-bit for the actual size difference.  The
 	 lowest bit is set if the DPI is different.  */
@@ -2278,7 +2277,7 @@
   if (len <= 1)
     return best_only ? AREF (vec, 0) : vec;
 
-  for (i = FONT_WEIGHT_INDEX; i <= FONT_SIZE_INDEX; i++)
+  for (i = FONT_WEIGHT_INDEX; i <= FONT_DPI_INDEX; i++)
     prefer_prop[i] = AREF (prefer, i);
 
   if (! NILP (spec))