1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-08 12:40:49 -08:00

(font_score): Even if the PIXEL_SIZE is the same, check

DPI too.
(font_sort_entites): Setup prefer_prop[FONT_DPI_INDEX] too.
This commit is contained in:
Kenichi Handa 2008-06-24 07:01:27 +00:00
parent aee08080a2
commit 2641e21320

View 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))