From: Eli Zaretskii <eliz@gnu.org>
To: Tim Ruffing <crypto@timruffing.de>
Cc: 67810@debbugs.gnu.org
Subject: bug#67810: 29.1; fonts use synthetic bold on Linux / pgtk
Date: Wed, 13 Dec 2023 14:39:36 +0200 [thread overview]
Message-ID: <83le9ys2d3.fsf@gnu.org> (raw)
In-Reply-To: <0719018bb386e840efaa655b7c0b765ece9cd9ff.camel@timruffing.de> (message from Tim Ruffing on Wed, 13 Dec 2023 13:03:47 +0100)
> From: Tim Ruffing <crypto@timruffing.de>
> Date: Wed, 13 Dec 2023 13:03:47 +0100
>
> To reproduce:
> 1. `emacs` -Q on Linux with pgtk enabled
> 2. `M-x select-frame-font` and select a font that doesn't have a
> bold weight
> 3. Observe that the buffer indicator (`*scratch*`) in the status
> line is in bold (using synthetic bold glyphs)
>
> This is annoying in combination with symbol fonts such as Nerd fonts.
> The bold versions of some symbols look strange, and worse, they may be
> too wide to fit two glyphs and are clipped then.
>
> What I have tried:
> * I thought this is a font-config thing. /etc/fonts/conf.d by default
> has a symlink 90-synthetic.conf that sets the "embolden" attribute
> for font queries that ask for a bold font but only regular is
> available. Removing that symlink does make a difference when I try
> `fc-match "MY-FONT:weight=bold" --verbose | grep bold`. With the
> symlink, fc sets the embolden attribute, and without the symlink, it
> doesn't. I can even see the difference in emacs' (Pango) font
> selection dialog. But emacs itself doesn't seem to care about this
> and still creates a synthesized bold font.
> * Cairo is supposed to pick this attribute up [1] and act accordingly,
> but that doesn't work. I tried to add a printf("synthesize: %d\n",
> cairo_ft_font_face_get_synthesize(font_face)); to the current emacs
> git (75fd7550ed6cede6c9e8224f1f2d62637c43fdd4) in ftcrfont_open, and
> this always prints "0" (even with the symlink in place!). AFAIU this
> means that Cairo should never embolden fonts, but some reason
> there's something in emacs that does it.
> * describe-font only shows the medium/regular variant.
Thanks, but why do you think this is an issue for Emacs to solve? I
don't think Emacs creates such "synthesized" fonts; are you sure it
does? I think Emacs just asks fontconfig for a bold font; it has no
knowledge whether it gets a real or a synthetic font.
next prev parent reply other threads:[~2023-12-13 12:39 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-13 12:03 bug#67810: 29.1; fonts use synthetic bold on Linux / pgtk Tim Ruffing
2023-12-13 12:39 ` Eli Zaretskii [this message]
2023-12-13 13:28 ` Tim Ruffing
2023-12-13 13:39 ` Eli Zaretskii
2023-12-13 15:09 ` Tim Ruffing
2023-12-13 15:43 ` Tim Ruffing
2023-12-14 0:09 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-14 7:28 ` Eli Zaretskii
2023-12-14 9:32 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-14 9:54 ` Tim Ruffing
2023-12-14 10:04 ` Eli Zaretskii
2023-12-14 10:37 ` Tim Ruffing
2023-12-14 11:19 ` Eli Zaretskii
2023-12-14 11:26 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-14 15:06 ` Tim Ruffing
2023-12-14 22:55 ` Stefan Kangas
2024-01-11 15:50 ` Tim Ruffing
2024-01-12 1:46 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-12 8:37 ` Eli Zaretskii
2024-01-12 9:59 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-12 11:46 ` Eli Zaretskii
2024-01-12 12:20 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-12 12:30 ` Eli Zaretskii
2024-01-12 13:12 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-12 14:12 ` Eli Zaretskii
2024-01-13 0:46 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-13 6:59 ` Eli Zaretskii
2024-01-14 1:02 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-14 6:24 ` Eli Zaretskii
2024-01-14 8:09 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-14 9:33 ` Eli Zaretskii
2024-01-14 13:44 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-14 14:03 ` Eli Zaretskii
2024-01-14 14:19 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-14 14:55 ` Eli Zaretskii
2024-01-15 13:11 ` Tim Ruffing
2024-01-13 6:37 ` Stefan Kangas
2024-01-14 0:55 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-14 5:23 ` Stefan Kangas
2024-01-14 10:20 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-14 12:21 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-14 14:10 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-14 16:37 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-15 0:36 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-15 13:56 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-15 14:02 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83le9ys2d3.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=67810@debbugs.gnu.org \
--cc=crypto@timruffing.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.