From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tim Ruffing Newsgroups: gmane.emacs.bugs Subject: bug#67810: 29.1; fonts use synthetic bold on Linux / pgtk Date: Wed, 13 Dec 2023 14:28:58 +0100 Message-ID: <3ebaf489f6dad748258c7fb01d3200b674ebb1f1.camel@timruffing.de> References: <0719018bb386e840efaa655b7c0b765ece9cd9ff.camel@timruffing.de> <83le9ys2d3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24255"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 67810@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 13 14:30:12 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rDPJT-00067Q-Jt for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 13 Dec 2023 14:30:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rDPJ5-0005z0-Vz; Wed, 13 Dec 2023 08:29:48 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rDPJ4-0005yn-Mn for bug-gnu-emacs@gnu.org; Wed, 13 Dec 2023 08:29:46 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rDPJ4-0007TK-Ee for bug-gnu-emacs@gnu.org; Wed, 13 Dec 2023 08:29:46 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rDPJK-000660-D9 for bug-gnu-emacs@gnu.org; Wed, 13 Dec 2023 08:30:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tim Ruffing Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 13 Dec 2023 13:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67810 X-GNU-PR-Package: emacs Original-Received: via spool by 67810-submit@debbugs.gnu.org id=B67810.170247416823366 (code B ref 67810); Wed, 13 Dec 2023 13:30:02 +0000 Original-Received: (at 67810) by debbugs.gnu.org; 13 Dec 2023 13:29:28 +0000 Original-Received: from localhost ([127.0.0.1]:58412 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDPIl-00064n-Mc for submit@debbugs.gnu.org; Wed, 13 Dec 2023 08:29:28 -0500 Original-Received: from mout-p-101.mailbox.org ([2001:67c:2050:0:465::101]:40356) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDPIj-00064Y-De for 67810@debbugs.gnu.org; Wed, 13 Dec 2023 08:29:26 -0500 Original-Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4SqxCH5zG9z9t2x; Wed, 13 Dec 2023 14:28:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=timruffing.de; s=MBO0001; t=1702474139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=XuxqD3Czsamhfc4K5Jee29Gvo4rNi5s5wMrCscx1doE=; b=d8NPUTFtJBvFoHKwG19pFkCRw9/m3p6Nv7IJklk9S50TjHBSzkFhOkRWHrOTmsX/BMrAp2 GBXuyl5n+rz68JstgrKwZcMsL7CgKd+g6KWdabcdeXqZUbGIUWotz6gzzqpwQpsLEjWfTr QO/iAaglivaoDYbk4BSjjOHObR6uTu8z21RByEAWmDHIRAcVBPk8nj+RcCAGG6MDxy6kdt WvTNzzwOXcNvwMtGTOTJGq+XLXQyk+FGan8tZxO8R7RQWXVnOu9HYWjt8at04AmBE839i8 rVCkGreLseSXiY/0lWHNZ/ULFBcqt7pFVQQpl5aELpMLH9VDLAtaPx8Fv2hlzQ== In-Reply-To: <83le9ys2d3.fsf@gnu.org> Autocrypt: addr=crypto@timruffing.de; prefer-encrypt=mutual; keydata=mQINBFz4LCMBEADLgtVg3uT+kybmXDPpXMvd8KBhTfAL5DP6umC9hkv/WHnfbCOUujhyvBljckcExAFr7tDYSgIjqa0L32SCT0NEaeY/s3WOYIacjBIEjTrgt01401lOWoX3XeYTWOlVUmUg+4iJPmBSPaj2bJR9Sq6NZhQjQ8K24VMtUNMiDeIIcstLkvQ4ZWkSuBUQJrJ0gUCZcUHNEyyGyZj1HOVGqGK7hTIiT1TfAgYKDDzk955LzgxbmATJWQLD7AGUIjKf/s418PTxI7Hh5ptH+Rq30+wkfvzJumYgkWUzeV6jzlOST5LkrFWQTfCXNvFNxSI9FVKjDIJZ7nQlgd+qNpGop90S3UqA8ofoG9liJm/jmbgIfJTgIiJpulycJD90PyJiWxtGshuZnHjCpkmU5vc1ZbuYyzH2wLoABSBsjy3Tb/25W2mnYnsOcVo1sWOGl+08Lb63ocVYGY27OrAIsv35pS/gMSGcJVg/EmPIM4+PmjeOxDlrJEW+8YzjKV9XtDv6VcBT1/OcA64knWC7JAGf0CGRodpolDjyfFRLOPV2/UbyOMJZjkxKTtV0je/RiMTupIHWcmimkvzpNo8D8U+Ac7KTPuPBrbj8EWeTbd/sK6bncjPL2DLomov0gCg/qlgObYmZ834+tQcThIBi3cj1cRj/0yKPy1uHgk2P2jO5i9AXGQARAQABtB9UaW0gUnVmZmluZyA8dGltQHRpbXJ1ZmZpbmcuZGU+iQJXBBMBCABBAhsBBQsJCAcCBhUKCQgLAgQWAgMBAh4 BAheAAhkBFiEECeA/hxCS5A4QbpArM7yGq4D/ X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:276127 Archived-At: On Wed, 2023-12-13 at 14:39 +0200, Eli Zaretskii wrote: =C2=A0 > 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. Well, *something* in the Emacs font rendering stack creates this bold variant. font-config can't create it, it's just a config layer but doesn't handle rendering. I'm really not an expert here with so many pieces in the stack but AFAIU Cairo can be asked to do so, and will just delegate to freetype. (Harfbuzz can also do it, see https://github.com/harfbuzz/harfbuzz/pull/4097 , but I see the bold in emacs when I configure --without-harfbuzz).=20 The thing is: If I query font-config manually, it tells me to use the regular font and not to embolden it (see below) .Emacs doesn't respect this.=20 So what we should have is a way to disable the emboldening. When I set my font-config settings such that emboldening is disabled, pango apparently respects this (as apparent from the font selection dialog) but emacs doesn't. A simple font for testing is this one here: https://www.dafont.com/elronet-monospace.font $ fc-match "ElroNet Monospace" Elronmonospace.ttf: "ElroNet Monospace" "Normal" But even when I ask for bold, there's no difference: $ fc-match "ElroNet Monospace:bold" Elronmonospace.ttf: "ElroNet Monospace" "Normal"=20 When I have configured font-config to create bold: $ fc-match "ElroNet Monospace:bold" --verbose | grep bold embolden: True(w) When I haven't: $ fc-match "ElroNet Monospace:bold" --verbose | grep bold (no match)