summaryrefslogtreecommitdiff
path: root/src/font.c
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2021-12-18 15:30:43 +0800
committerPo Lu <luangruo@yahoo.com>2021-12-18 15:30:43 +0800
commit6ad5ff4496085a74015a03d8bc0e891dbd4c3914 (patch)
tree7a805524b8e2327282c8c9dd28b2d1086ed1d781 /src/font.c
parent5e5cde55e5be6e2d388252c3ccb0d019aee6b89e (diff)
parent0c240e42353976b9e6ee90d345abf31359ca5e8d (diff)
downloademacs-6ad5ff4496085a74015a03d8bc0e891dbd4c3914.tar.gz
Merge remote-tracking branch 'origin/master' into feature/pgtk
Diffstat (limited to 'src/font.c')
-rw-r--r--src/font.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/font.c b/src/font.c
index fa831f28615..f2fd64e76ee 100644
--- a/src/font.c
+++ b/src/font.c
@@ -2768,7 +2768,6 @@ font_delete_unmatched (Lisp_Object vec, Lisp_Object spec, int size)
int candidate = XFIXNUM (AREF (entity, prop)) >> 8;
if (candidate != required
-#ifdef HAVE_NTGUI
/* A kludge for w32 font search, where listing a
family returns only 4 standard weights: regular,
italic, bold, bold-italic. For other values one
@@ -2778,10 +2777,14 @@ font_delete_unmatched (Lisp_Object vec, Lisp_Object spec, int size)
weight, so if we require exact match, the
non-regular font will be rejected. So we relax
the accuracy of the match here, and let
- font_sort_entities find the best match. */
+ font_sort_entities find the best match.
+
+ Similar things happen on Posix platforms, when
+ people use font families that don't have the
+ regular weight, only the medium weight: these
+ families get rejected if we require an exact match. */
&& (prop != FONT_WEIGHT_INDEX
|| eabs (candidate - required) > 100)
-#endif
)
prop = FONT_SPEC_MAX;
}