From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#59347: 29.0.50; `:family` face setting ignored Date: Sat, 19 Nov 2022 09:21:52 +0200 Message-ID: <83bkp39zov.fsf@gnu.org> References: <83bkp4bfqf.fsf@gnu.org> <83wn7s9txp.fsf@gnu.org> <83pmdk9pat.fsf@gnu.org> <83k03s9o0z.fsf@gnu.org> <7B856D61-9CA6-4068-A9DB-FAE31258F114@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9640"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casouri@gmail.com, 59347@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 19 08:22:20 2022 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 1owIB8-0002Hb-Dh for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Nov 2022 08:22:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1owIAv-0003xq-KJ; Sat, 19 Nov 2022 02:22:05 -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 1owIAs-0003xb-TX for bug-gnu-emacs@gnu.org; Sat, 19 Nov 2022 02:22:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1owIAs-0001Jl-LP for bug-gnu-emacs@gnu.org; Sat, 19 Nov 2022 02:22:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1owIAs-0006VP-Db for bug-gnu-emacs@gnu.org; Sat, 19 Nov 2022 02:22:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Nov 2022 07:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59347 X-GNU-PR-Package: emacs Original-Received: via spool by 59347-submit@debbugs.gnu.org id=B59347.166884251524995 (code B ref 59347); Sat, 19 Nov 2022 07:22:02 +0000 Original-Received: (at 59347) by debbugs.gnu.org; 19 Nov 2022 07:21:55 +0000 Original-Received: from localhost ([127.0.0.1]:38877 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owIAl-0006V4-04 for submit@debbugs.gnu.org; Sat, 19 Nov 2022 02:21:55 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46760) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owIAi-0006Ur-AL for 59347@debbugs.gnu.org; Sat, 19 Nov 2022 02:21:53 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1owIAc-0001By-RH; Sat, 19 Nov 2022 02:21:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=x13O+Stg9QLLgkFnRFOTJyKNAzRJvqwVrWDdWVi5vqw=; b=U+Pcv4P93Ze16f78O1JK evGydsQQ6CapVZZ79APMuUZiFeRfa2O3Hq2o2qv0gtWd0u13VErLex/Ko5C7kDjrgRJE3Vy0xZuxx y72TTH6yHtUbpqpX1MVX6qa1+/tDMdkQaNCC3h9S+DVyZOd6IEMNzHnIlynKjdV3GsaPWHcC1sRk1 qz9z/LYoif40zjkzhV3EG8/6+vIGVQdsgwAdYSRo1zRONOyDXkpbD8b8nbjmLR+ajaRQ/uQDp0wEg z5Dl7OXHtn0uLdmcTPprXpzZv9hmVraPSk1VVCnzj4j68cbTO4hmHZLCHtfalMGY2pLpp254oTqj0 U7LomI5THggtPQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1owIAc-0006FC-Ak; Sat, 19 Nov 2022 02:21:46 -0500 In-Reply-To: (message from Stefan Monnier on Fri, 18 Nov 2022 16:09:46 -0500) 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:248312 Archived-At: > From: Stefan Monnier > Cc: Eli Zaretskii , 59347@debbugs.gnu.org > Date: Fri, 18 Nov 2022 16:09:46 -0500 > > >> So my guess is that if the face uses the :family attribute, it > >> inherits the weight from default, and if Emacs cannot find that > >> weight in that font, it falls back to some other font. > > But my `font` pattern doesn't specify a "weight". Then it's some other attribute. > >> Personally I think falling back to the same font but different weight > >> is probably less confusing. > > Ignoring a "bold" setting would probably surprise/disappoint users just > as often. Exactly. > > Basically the culprit in Stefan’s recipe is probably semicondensed > > rather than Dejavu. > > Could be, indeed. I don't actually care about the width of the font > when I request `DejaVu Sans`. This said, if I use > > (:family "DejaVu Sans" :width normal) > > I still don't get `DejaVu Sans` but I get a "normal" (hence wider) > misc-fixed instead :-( The basic problem here is that we don't know which attributes to ignore and which to enforce, first, because different users have different preferences and expectations, and second, because the same font selection routines are involved in many different use cases. All the attempts to resolve these issues till now boiled down to arbitrarily ignoring some or even all attributes of the font whose face is being modified by setting a different font, and that can never be TRT. If we can find a reasonable way to decide which attributes of a font are important and which aren't, or maybe lax some of the criteria for matching fonts to a font spec, that could solve at least some of the problems.