summaryrefslogtreecommitdiff
path: root/src/font.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2022-01-06 14:16:53 +0200
committerEli Zaretskii <eliz@gnu.org>2022-01-06 14:16:53 +0200
commitca25fde951f906f6236875234e318b48a9feaa63 (patch)
tree821cb8057b27492613a02e22c34c9a2afdfb4218 /src/font.c
parentcbe10f37533bc8dc21f7eb9a86bc5f31b3b2c884 (diff)
downloademacs-ca25fde951f906f6236875234e318b48a9feaa63.tar.gz
Revert "Fix selection of fonts that don't have regular weight"
This reverts commit 1b2511fa2aed460120a36765ba16c14e355eef1d. That commit caused unintended regressions which are worse than the problem it attempted to fix. See the discussion at https://lists.gnu.org/archive/html/emacs-devel/2021-12/msg01643.html for the details.
Diffstat (limited to 'src/font.c')
-rw-r--r--src/font.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/font.c b/src/font.c
index 58ff1a7981b..266e5bc75c6 100644
--- a/src/font.c
+++ b/src/font.c
@@ -2768,6 +2768,7 @@ 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
@@ -2777,14 +2778,10 @@ 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.
-
- 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. */
+ font_sort_entities find the best match. */
&& (prop != FONT_WEIGHT_INDEX
|| eabs (candidate - required) > 100)
+#endif
)
prop = FONT_SPEC_MAX;
}