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:
parent
aee08080a2
commit
2641e21320
1 changed files with 2 additions and 3 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue