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 17:31:55 +0200 Message-ID: <838rk77yfo.fsf@gnu.org> References: <83bkp4bfqf.fsf@gnu.org> <83wn7s9txp.fsf@gnu.org> <83pmdk9pat.fsf@gnu.org> <83cz9j9zyu.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29900"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 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 16:33:15 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 1owPqF-0007Yt-KS for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Nov 2022 16:33:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1owPq3-0005mz-Fm; Sat, 19 Nov 2022 10:33:03 -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 1owPq2-0005mr-Ci for bug-gnu-emacs@gnu.org; Sat, 19 Nov 2022 10:33: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 1owPq2-0005G2-2j for bug-gnu-emacs@gnu.org; Sat, 19 Nov 2022 10:33:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1owPq1-0000gU-TK for bug-gnu-emacs@gnu.org; Sat, 19 Nov 2022 10:33:01 -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 15:33:01 +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.16688719222556 (code B ref 59347); Sat, 19 Nov 2022 15:33:01 +0000 Original-Received: (at 59347) by debbugs.gnu.org; 19 Nov 2022 15:32:02 +0000 Original-Received: from localhost ([127.0.0.1]:40970 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owPp3-0000f1-9j for submit@debbugs.gnu.org; Sat, 19 Nov 2022 10:32:01 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33106) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owPoz-0000ei-Av for 59347@debbugs.gnu.org; Sat, 19 Nov 2022 10:31:59 -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 1owPot-0005BG-RI; Sat, 19 Nov 2022 10:31:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=u3N7WX9zUGdtllOP74uBBA+ud2ZEG4o7O98ecKu2zP4=; b=qN9MQK5OY480 kBxmiY4Gx55tWQttpW0FmM7eh4bGOeMrMGZGFnbWj3v/rAcej+rpQwHPc2PExqd7yQYxrVEiY9iAW qfOcC26TXVwOE2JLeLrwH5/Mqx4dplmH+uzRRIhX6wKx/4JIdH9UDu0BPK/1kbcVTLSVHI3sj6fjP 0EY8W2sHFNqlJ/X30NuxABCc0D0jPvqE7UMsj5fgG6ZoQ5kNhBmx1OJZKP7pa2UsKm12NjnXjiybi l8EDOcPvmjCb/ckLuSpnPUEAXTKFCrH/1NPeJS4K0mZn0/zThtdK/35n5RxL66f8J0d6sc2y3iCT7 Gt+MTma3WO5qnO45i4MB/w==; 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 1owPot-0002TV-3g; Sat, 19 Nov 2022 10:31:51 -0500 In-Reply-To: (message from Stefan Monnier on Sat, 19 Nov 2022 09:55:29 -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:248348 Archived-At: > From: Stefan Monnier > Cc: 59347@debbugs.gnu.org > Date: Sat, 19 Nov 2022 09:55:29 -0500 > > > Then Emacs does here what we intended it to do: it tries to match the > > variable-pitch font to the attributes of the default font. And DejaVu > > Sans fails that test on your system, because DejaVu Sans doesn't have > > a variant with the font attributes that are present in misc-fixed font > > you use as the default face's font. > > Then maybe the problem is the following: I do not consider > `-misc-fixed-*-r-semicondensed-*-13-*-*-*-*-*-*-*` to include "please > use non-anti-aliased fonts", contrary to the `-fn monospace:antialias=0` > of bug#37473? Antialias attribute is just one of the attributes. The problem is much larger and more general than just that single attribute. > Oh wait... I can recover the behavior I want by selecting > > :family "DejaVu Sans" :foundry "PfEd" > > so the problem is the foundry info. Changing the recipe to use > > -*-fixed-*-r-semicondensed-*-13-*-*-*-*-*-*-* > > doesn't help, OTOH (IOW Emacs insists on preserving the foundry even if > I did not explicitly request any particular foundry). > > Does it make sense to preserve the `:foundry` attribute when the > `:family` is different? I don't know; it might be. > Is there some way to say `:foundry any` in order to override the > default's foundry but without having to choose a particular foundry? We will need to set it to nil where the font spec is passed to font-selection functions, I guess. But I'd be happier if you could step through the code and verified that indeed the foundry mismatch is what causes us to reject DejaVu Sans, and that after we reject it, we never try it with foundry set to nil in the font-spec. Perhaps we first set family to nil and only after that set foundry to nil? If this is indeed what happens, I'm okay with adding a variable that could control whether we try to adhere to foundry in font selection, and letting people try with it on and off. Alternatively, why not document that including foundry in the font spec is the solution to such problems? > PS: Things become really weird with: > > src/emacs -Q --eval '(progn (custom-set-faces `(variable-pitch ((t (:family "DejaVu Sans" :foundry "*"))))) (add-to-list `default-frame-alist `(font . "-*-fixed-*-*-semicondensed-*-13-*-*-*-*-*-*-*")) (font-lock-mode -1) (insert (propertize "hello" `face `variable-pitch) " world"))' > > where "hello" ends up with the following font: > > ftcrhb:-urw-Century Schoolbook L-medium-normal-normal-*-13-*-*-*-*-0-iso10646-1 Why is this weird?