Subject: Re: bug#67810: 29.1; fonts use synthetic bold on Linux / pgtk

From: Eli Zaretskii <[email-masked]>
Date: Thu, 14 Dec 2023 09:28:09 +0200

> From: Po Lu <[email-masked]>
> Cc: Eli Zaretskii <[email-masked]>,  [email-masked]
> Date: Thu, 14 Dec 2023 08:09:11 +0800
> 
> Tim Ruffing <[email-masked]> writes:
> 
> > On Wed, 2023-12-13 at 15:39 +0200, Eli Zaretskii wrote:
> >> 
> >> Maybe this is done by the calls to the font backend with FC_EMBOLDEN
> >> parameter?  I'm no expert on these font backends, but maybe you could
> >> play with those calls and see if disabling them gets you what you
> >> want?  You can find the relevant code by searching the C sources for
> >> FC_EMBOLDEN.
> >
> > Thanks for the suggestion, but no luck unfortunately. What also didn't
> > help is going back to Xft by configuring like this:
> > ./configure --without-pgtk --without-cairo 
> >
> > I don't know what to try next, I guess it will be useful to have
> > someone more familiar with the font stuff look at this. 
> 
> There's no bug here: when a bold face is displayed by a font which
> doesn't provide a bold variant, Emacs overstrikes text displayed in that
> font to create visual contrast between the bold text and its
> surroundings.  This is implemented independently of font backend
> features such as FC_EMBOLDEN.

Can you point me at the place in the code where we do this?

> If this contrast is undesirable, remove the weight attribute from the
> face.

We could have a variable exposed to Lisp to inhibit this overstriking,
if some users want that.