diff options
author | Eli Zaretskii <eliz@gnu.org> | 2022-04-28 10:50:50 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2022-04-28 10:50:50 +0300 |
commit | 76d4e19f8984128d9253673fa91ce5423e9293f1 (patch) | |
tree | c617ccae45501db6cfcfec2da7d7d4400a9f260b /src/xfaces.c | |
parent | 9c70045f674b31db7a640d8a59939ce8df7ed37b (diff) | |
download | emacs-76d4e19f8984128d9253673fa91ce5423e9293f1.tar.gz emacs-76d4e19f8984128d9253673fa91ce5423e9293f1.tar.bz2 emacs-76d4e19f8984128d9253673fa91ce5423e9293f1.zip |
Fix handling of proportional fonts on MS-Windows
* src/xfaces.c (Fx_family_fonts): Consider fonts whose :spacing
value is numeric, but still indicates that they are proportional,
to be proportional.
* lisp/textmodes/artist.el (artist-mode): Fix test for monospaced
fonts.
Diffstat (limited to 'src/xfaces.c')
-rw-r--r-- | src/xfaces.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/xfaces.c b/src/xfaces.c index d7f1f4d96e5..c41782f4f38 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -1573,7 +1573,14 @@ the face font sort order. */) make_fixnum (point), FONT_WEIGHT_SYMBOLIC (font), FONT_SLANT_SYMBOLIC (font), - NILP (spacing) || EQ (spacing, Qp) ? Qnil : Qt, + (NILP (spacing) + || EQ (spacing, Qp) + /* If the font was specified in a way + different from XLFD (e.g., on MS-Windows), + we will have a number there, not 'p'. */ + || EQ (spacing, + make_fixnum (FONT_SPACING_PROPORTIONAL))) + ? Qnil : Qt, Ffont_xlfd_name (font, Qnil), AREF (font, FONT_REGISTRY_INDEX)); result = Fcons (v, result); |