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: Thu, 08 Dec 2022 10:09:58 +0200 Message-ID: <83tu262u5l.fsf@gnu.org> References: <83tu2t4ie9.fsf@gnu.org> <7cc9e03786e324ff82ef@heytings.org> <83bkp04gjl.fsf@gnu.org> <83leo42vm9.fsf@gnu.org> <0d1ea3007fd94b7ae0b1@heytings.org> <83r0xv1649.fsf@gnu.org> <0d1ea3007f532a493429@heytings.org> <83cz9f12bh.fsf@gnu.org> <835yewleyn.fsf@gnu.org> <83tu2b9rlx.fsf@gnu.org> <83k0347gtu.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7535"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gregory@heytings.org, 59347@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 08 09:11:32 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 1p3C0B-0001ky-L4 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 08 Dec 2022 09:11:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3Bzx-0000JB-DC; Thu, 08 Dec 2022 03:11:17 -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 1p3Bzm-0000IX-Cq for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2022 03:11:07 -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 1p3Bzj-0002e3-4L for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2022 03:11:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p3Bzi-0005Us-Jw for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2022 03:11: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: Thu, 08 Dec 2022 08:11: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.167048702421118 (code B ref 59347); Thu, 08 Dec 2022 08:11:02 +0000 Original-Received: (at 59347) by debbugs.gnu.org; 8 Dec 2022 08:10:24 +0000 Original-Received: from localhost ([127.0.0.1]:55155 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3Bz4-0005UY-BO for submit@debbugs.gnu.org; Thu, 08 Dec 2022 03:10:24 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46266) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3Byz-0005UO-Au for 59347@debbugs.gnu.org; Thu, 08 Dec 2022 03:10:21 -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 1p3Bys-0002Xw-7a; Thu, 08 Dec 2022 03:10:10 -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=ZIDljAwf9UQxO00ASlP71NEcJaj3NLUnI+TsxNsvuJQ=; b=dOFsVaz5rHTr /KFszVvfT0sIxqiBCWirQKK7sIFo+uhTNsqXxWjD3SFAq4hI6V0zsai1h/MDyKvxl2pSUviyr6LO0 p6sJcaykFHhe7baQSdHNiXpEwMyXGVLVnLC0hmVyhUhEWPvOT+ICUM7/GqhMFRVs5hiaQFpS3z0Qa CusyfL2MKMuim2DoVFjwsKkLsBRuxedtHqqlZT7ig1dleqSbaNz3ZZMWRE80Wm8nFpZB+hY8j0VsQ 7tUSXH7WrQOb8eKd3pCnxq47Ca9xyu7mCz2LajrZVHOff8n8wfb/5dHUOmu5zqK6XVSPsIdVUyoPJ PMLAHi3usdLiByjx7xDJeA==; 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 1p3Byr-0001Dn-Nr; Thu, 08 Dec 2022 03:10:10 -0500 In-Reply-To: (message from Stefan Monnier on Wed, 07 Dec 2022 19:27:28 -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:250248 Archived-At: > From: Stefan Monnier > Cc: Eli Zaretskii , 59347@debbugs.gnu.org > Date: Wed, 07 Dec 2022 19:27:28 -0500 > > >> My question was not about this basic relative importance, it was about > >> something else: when none of the fonts of the given FAMILY fits the font > >> spec, why do you consider keeping the family to be more important than > >> keeping the weight? > > I don't understand your question. If we agree that there is an order of > > importance in the attributes of a font spec, > > Why should we agree on that? > > When I specify the `:family` property on the `variable-pitch` face, > I definitely want it to take precedence over the `:weight` of the > default face, yes. > > But when I specify the `weight` property of the `bold` face, it's not > clear at all that the `:family` of the default face should take precedence > over the `:weight` of the `bold` face. If we want to distinguish between explicitly requested attributes and inherited attributes, we need to store this information inside the font spec. (We have the :user-spec attribute, but it is used for slightly different purposes.) Please also note that explicit requests for attributes can come from a Lisp program, not from the user. > FWIW, I've been running with your patch and I like the result. Which patch is that? The one proposed in the message to which you are responding, or one of the earlier ones? > Maybe the ordering should depend on the "stacking order" of the faces > and their properties. I.e. instead of merging `bold+variable-pitch+default` to get > a set of properties on which we apply a globally-imposed ordering, we > could keep track of the relative ordering of the properties: `bold` was > on top, so the `:weight` property comes first, then came > `variable-pitch` so its `:family` property comes second and the second > comes afterwards. > > So `bold+variable-pitch+default` could result in a different font than > `variable-pitch+bold+default` even if the combined properties (i.e. the > merged face) are identical. How would you determine the order in the stack? IOW, which attributes will be "the first"?