On 2025-07-23 16:06, Sean Whitton wrote:
Hello,

Hello Sean and everybody!

On Mon 21 Jul 2025 at 08:13pm GMT, Ihor Radchenko wrote:

Sean Whitton <spwhit...@spwhitton.name> writes:

I couldn't find any mailing list discussion as to why commit 667cb6f1a
was reverted (in commit 8aff82568).

I think that at least org-verbatim and org-code should clearly inherit from fixed-pitch. But I assume there was some bug which became apparent
after Prot's original change?

The reverting has been requested by Prots because fixed pitch fonts are
not very good on Windows, AFAIR.
See https://yhetil.org/emacs-devel/1758826875.387473.1633124447...@mail1.libero.it/

Thanks.  How about we conditionalise on the platform in order to enable
fixed-pitch for these faces for users on platforms where this problem
does not show up?  I.e.

--8<---------------cut here---------------start------------->8---
diff --git a/lisp/org-faces.el b/lisp/org-faces.el
index a9a906e03..d0422c0fe 100644
--- a/lisp/org-faces.el
+++ b/lisp/org-faces.el
@@ -409,7 +409,9 @@ changes."
   "Face for formulas."
   :group 'org-faces)

-(defface org-code '((t :inherit shadow))
+(defface org-code '((((type w32)) :inherit shadow)
+                    (((type ns)) :inherit shadow)
+                    (t :inherit (fixed-pitch shadow)))
   "Face for fixed-width text like code snippets."
   :group 'org-faces
   :version "22.1")
--8<---------------cut here---------------end--------------->8---

... plus an explanatory comment?

If I remember correctly, the problem back then had to do with the meaning of the "Monospace" font on some GNU/Linux distributions (maybe it was on Debian, but I am not sure anymore). It would be a bitmap font while the rest of the buffer was using outline fonts. Depending on the exact typeface, bitmap fonts are virtually unusable against a light backdrop. A similar issue exists with the font family of the 'fixed-pitch-serif' face.

Looking at it now, it probably is safer to just ':inherit fixed-pitch'. It might not look nice on some platforms, though this should be fixed elsewhere. The goal is to avoid combining outline and bitmap fonts, if possible, especially given the default white background.

All the best,
Protesilaos (or simply "Prot")

Reply via email to