Subject: Re: bug#18818: Incorrect font weight in dark background, Emacs 24.4 on Mac OS X 10.10

From: Lars Ingebrigtsen <[email-masked]>
Date: Thu, 19 Aug 2021 16:31:26 +0200

YAMAMOTO Mitsuharu <[email-masked]> writes:

> This is a long-standing bug in Core Graphics.  The Mac port contains
> an info node suggesting some workaround:
>
>      Also, synthetic bold looks thinner if the background is darker than
>   the foreground and the LCD font smoothing is turned on.  In such cases,
>   you can turn off synthetic bold for particular fonts and use
>   overstriking instead by customizing the variable ‘face-ignored-fonts’:
>
>        (add-to-list 'face-ignored-fonts "\\`-[^-]*-monaco-bold-")

So it sounds like this isn't something we can fix on the Emacs side, but
perhaps we should just add this text to the manual?

That is, if this is still an issue in Emacs 28; I haven't checked.

Alan, does this look reasonable to you?

diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi
index cd1db1a7ba..b60b584c82 100644
--- a/doc/emacs/macos.texi
+++ b/doc/emacs/macos.texi
@@ -201,7 +201,7 @@ Mac / GNUstep Customization
 number makes the trackpad less sensitive.
 @end table
 
-@subsection Font Panel
+@subsection Fonts
 
 @findex ns-popup-font-panel
 The standard Mac / GNUstep font panel is accessible with @kbd{M-x
@@ -211,6 +211,16 @@ Mac / GNUstep Customization
 @c  To make the setting permanent, use @samp{Save Options} in the
 @c Options menu, or run @code{menu-bar-options-save}.
 
+Synthetic bold looks thinner if the background is darker than the
+foreground and the LCD font smoothing is turned on.  In such cases,
+you can turn off synthetic bold for particular fonts and use
+overstriking instead by customizing the variable
+@code{face-ignored-fonts}:
+
+@lisp
+(push "\\`-[^-]*-monaco-bold-" face-ignored-fonts)
+@end lsip
+
 @node Mac / GNUstep Events
 @section Windowing System Events under macOS / GNUstep
 @cindex events on macOS

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no