]> git.eshelyaron.com Git - emacs.git/commitdiff
(font_score): Even if the PIXEL_SIZE is the same, check
authorKenichi Handa <handa@m17n.org>
Tue, 24 Jun 2008 07:01:27 +0000 (07:01 +0000)
committerKenichi Handa <handa@m17n.org>
Tue, 24 Jun 2008 07:01:27 +0000 (07:01 +0000)
DPI too.
(font_sort_entites): Setup prefer_prop[FONT_DPI_INDEX] too.

src/font.c

index b49fde8cb7e2ff64f7f2647de766d577e4d3d23c..4d8c9725844cb37c10d17022fad156a4b794a37d 100644 (file)
@@ -2212,8 +2212,7 @@ font_score (entity, spec_prop)
 
   /* 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 @@ font_sort_entites (vec, prefer, frame, spec, best_only)
   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))