From unknown Sun Jun 22 03:57:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#45920: 28.0.50; set-face-attribute cannot read :family when different :weight exist Resent-From: Protesilaos Stavrou Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Jan 2021 20:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 45920 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 45920@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.161082781726838 (code B ref -1); Sat, 16 Jan 2021 20:11:01 +0000 Received: (at submit) by debbugs.gnu.org; 16 Jan 2021 20:10:17 +0000 Received: from localhost ([127.0.0.1]:44083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0rto-0006yo-LV for submit@debbugs.gnu.org; Sat, 16 Jan 2021 15:10:16 -0500 Received: from lists.gnu.org ([209.51.188.17]:46924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0rtk-0006yc-IO for submit@debbugs.gnu.org; Sat, 16 Jan 2021 15:10:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37172) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0rtk-0003Fn-Ds for bug-gnu-emacs@gnu.org; Sat, 16 Jan 2021 15:10:12 -0500 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:59581) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0rtg-0002wX-I5 for bug-gnu-emacs@gnu.org; Sat, 16 Jan 2021 15:10:12 -0500 X-Originating-IP: 94.46.225.161 Received: from kronos (unknown [94.46.225.161]) (Authenticated sender: public@protesilaos.com) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 2DF6E1C0002 for ; Sat, 16 Jan 2021 20:10:01 +0000 (UTC) From: Protesilaos Stavrou Date: Sat, 16 Jan 2021 22:09:54 +0200 Message-ID: <875z3wprsd.fsf@protesilaos.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: none client-ip=217.70.183.197; envelope-from=info@protesilaos.com; helo=relay5-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Dear maintainers, I have noticed that setting fonts via 'set-face-attribute' works as intended except in the following scenario (on 'emacs -Q'): ;; Sample 1 (set-face-attribute 'default nil :family "Source Code Pro" :weight 'light) ;; Sample 2 (set-face-attribute 'default nil :family "Hack" :weight 'normal) If you evaluate sample 1, you will get the desired behaviour. Namely, the font family for the default face is the one specified, as is the typographic weight. Now if you proceed to evaluate sample 2, you will notice that only the weight gets updated. The family continues to be that of sample 1. At this point, to get the family of sample 2, you need to evaluate sample 2 one more time. I tried various combinations and my impression is that the problem occurs when the :weight properties are different. Other properties, such as :height, do not exhibit this behaviour. Can you reproduce this on your end? All the best, Protesilaos -- Protesilaos Stavrou protesilaos.com From unknown Sun Jun 22 03:57:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#45920: 28.0.50; set-face-attribute cannot read :family when different :weight exist Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Jan 2021 20:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45920 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Protesilaos Stavrou Cc: 45920@debbugs.gnu.org Received: via spool by 45920-submit@debbugs.gnu.org id=B45920.161082875028213 (code B ref 45920); Sat, 16 Jan 2021 20:26:01 +0000 Received: (at 45920) by debbugs.gnu.org; 16 Jan 2021 20:25:50 +0000 Received: from localhost ([127.0.0.1]:44090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0s8s-0007Kz-4M for submit@debbugs.gnu.org; Sat, 16 Jan 2021 15:25:50 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0s8p-0007Km-1s for 45920@debbugs.gnu.org; Sat, 16 Jan 2021 15:25:48 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57927) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0s8i-0001cR-ON; Sat, 16 Jan 2021 15:25:40 -0500 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2298 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l0s8i-0002K4-2t; Sat, 16 Jan 2021 15:25:40 -0500 Date: Sat, 16 Jan 2021 22:25:43 +0200 Message-Id: <83pn248w8o.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <875z3wprsd.fsf@protesilaos.com> (message from Protesilaos Stavrou on Sat, 16 Jan 2021 22:09:54 +0200) References: <875z3wprsd.fsf@protesilaos.com> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Protesilaos Stavrou > Date: Sat, 16 Jan 2021 22:09:54 +0200 > > ;; Sample 1 > (set-face-attribute 'default nil > :family "Source Code Pro" > :weight 'light) > > ;; Sample 2 > (set-face-attribute 'default nil > :family "Hack" > :weight 'normal) > > If you evaluate sample 1, you will get the desired behaviour. Namely, > the font family for the default face is the one specified, as is the > typographic weight. > > Now if you proceed to evaluate sample 2, you will notice that only the > weight gets updated. The family continues to be that of sample 1. > > At this point, to get the family of sample 2, you need to evaluate > sample 2 one more time. > > I tried various combinations and my impression is that the problem > occurs when the :weight properties are different. Other properties, > such as :height, do not exhibit this behaviour. I didn't try to reproduce, because I don't have one of these fonts. However, it might be relevant that when you call set-face-attribute with several attributes related to the face's font, the underlying primitive, internal-set-lisp-face-attribute, is called multiple time, one time for every attribute. So the order of those calls might matter, especially if one of the fonts doesn't support some of the values of all the attributes (e.g., the 'normal' weight in this case). From unknown Sun Jun 22 03:57:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#45920: 28.0.50; set-face-attribute cannot read :family when different :weight exist Resent-From: Protesilaos Stavrou Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Jan 2021 21:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45920 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 45920@debbugs.gnu.org Received: via spool by 45920-submit@debbugs.gnu.org id=B45920.161083095731607 (code B ref 45920); Sat, 16 Jan 2021 21:03:01 +0000 Received: (at 45920) by debbugs.gnu.org; 16 Jan 2021 21:02:37 +0000 Received: from localhost ([127.0.0.1]:44120 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0siS-0008Dj-IX for submit@debbugs.gnu.org; Sat, 16 Jan 2021 16:02:36 -0500 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:61911) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0siP-0008DT-Fi for 45920@debbugs.gnu.org; Sat, 16 Jan 2021 16:02:35 -0500 X-Originating-IP: 94.46.225.161 Received: from kronos (unknown [94.46.225.161]) (Authenticated sender: public@protesilaos.com) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 020E640005; Sat, 16 Jan 2021 21:02:26 +0000 (UTC) From: Protesilaos Stavrou References: <875z3wprsd.fsf@protesilaos.com> <83pn248w8o.fsf@gnu.org> Date: Sat, 16 Jan 2021 23:02:24 +0200 In-Reply-To: <83pn248w8o.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 16 Jan 2021 22:25:43 +0200") Message-ID: <871rekppcv.fsf@protesilaos.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 2021-01-16, 22:25 +0200, Eli Zaretskii wrote: >> From: Protesilaos Stavrou >> Date: Sat, 16 Jan 2021 22:09:54 +0200 >> >> ;; Sample 1 >> (set-face-attribute 'default nil >> :family "Source Code Pro" >> :weight 'light) >> >> ;; Sample 2 >> (set-face-attribute 'default nil >> :family "Hack" >> :weight 'normal) >> >> If you evaluate sample 1, you will get the desired behaviour. Namely, >> the font family for the default face is the one specified, as is the >> typographic weight. >> >> Now if you proceed to evaluate sample 2, you will notice that only the >> weight gets updated. The family continues to be that of sample 1. >> >> At this point, to get the family of sample 2, you need to evaluate >> sample 2 one more time. >> >> I tried various combinations and my impression is that the problem >> occurs when the :weight properties are different. Other properties, >> such as :height, do not exhibit this behaviour. > > I didn't try to reproduce, because I don't have one of these fonts. > However, it might be relevant that when you call set-face-attribute > with several attributes related to the face's font, the underlying > primitive, internal-set-lisp-face-attribute, is called multiple time, > one time for every attribute. So the order of those calls might > matter, especially if one of the fonts doesn't support some of the > values of all the attributes (e.g., the 'normal' weight in this case). Thank you Eli for the prompt reply! Following your input, I tried alternating between those two and they both give me the right results: (progn (internal-set-lisp-face-attribute 'default :family "Source Code Pro" 0) (internal-set-lisp-face-attribute 'default :weight 'light 0)) (progn (internal-set-lisp-face-attribute 'default :weight 'normal 0) (internal-set-lisp-face-attribute 'default :family "Hack" 0)) Please feel free to close this. -- Protesilaos Stavrou protesilaos.com From unknown Sun Jun 22 03:57:17 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Protesilaos Stavrou Subject: bug#45920: closed (Re: bug#45920: 28.0.50; set-face-attribute cannot read :family when different :weight exist) Message-ID: References: <83o8ho8cmn.fsf@gnu.org> <875z3wprsd.fsf@protesilaos.com> X-Gnu-PR-Message: they-closed 45920 X-Gnu-PR-Package: emacs Reply-To: 45920@debbugs.gnu.org Date: Sun, 17 Jan 2021 03:30:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1610854202-2033-1" This is a multi-part message in MIME format... ------------=_1610854202-2033-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #45920: 28.0.50; set-face-attribute cannot read :family when different :wei= ght exist which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 45920@debbugs.gnu.org. --=20 45920: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D45920 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1610854202-2033-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 45920-done) by debbugs.gnu.org; 17 Jan 2021 03:29:27 +0000 Received: from localhost ([127.0.0.1]:44424 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0ykp-0000Vp-4s for submit@debbugs.gnu.org; Sat, 16 Jan 2021 22:29:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44586) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0ykm-0000Vc-RC for 45920-done@debbugs.gnu.org; Sat, 16 Jan 2021 22:29:25 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60666) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0ykg-0004vE-Ve; Sat, 16 Jan 2021 22:29:18 -0500 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4436 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l0ykf-0002Ub-56; Sat, 16 Jan 2021 22:29:18 -0500 Date: Sun, 17 Jan 2021 05:29:20 +0200 Message-Id: <83o8ho8cmn.fsf@gnu.org> From: Eli Zaretskii To: Protesilaos Stavrou In-Reply-To: <871rekppcv.fsf@protesilaos.com> (message from Protesilaos Stavrou on Sat, 16 Jan 2021 23:02:24 +0200) Subject: Re: bug#45920: 28.0.50; set-face-attribute cannot read :family when different :weight exist References: <875z3wprsd.fsf@protesilaos.com> <83pn248w8o.fsf@gnu.org> <871rekppcv.fsf@protesilaos.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 45920-done Cc: 45920-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Protesilaos Stavrou > Cc: 45920@debbugs.gnu.org > Date: Sat, 16 Jan 2021 23:02:24 +0200 > > Following your input, I tried alternating between those two and they > both give me the right results: > > (progn > (internal-set-lisp-face-attribute 'default :family "Source Code Pro" 0) > (internal-set-lisp-face-attribute 'default :weight 'light 0)) > > (progn > (internal-set-lisp-face-attribute 'default :weight 'normal 0) > (internal-set-lisp-face-attribute 'default :family "Hack" 0)) > > Please feel free to close this. Done. ------------=_1610854202-2033-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 16 Jan 2021 20:10:17 +0000 Received: from localhost ([127.0.0.1]:44083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0rto-0006yo-LV for submit@debbugs.gnu.org; Sat, 16 Jan 2021 15:10:16 -0500 Received: from lists.gnu.org ([209.51.188.17]:46924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0rtk-0006yc-IO for submit@debbugs.gnu.org; Sat, 16 Jan 2021 15:10:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37172) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0rtk-0003Fn-Ds for bug-gnu-emacs@gnu.org; Sat, 16 Jan 2021 15:10:12 -0500 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:59581) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0rtg-0002wX-I5 for bug-gnu-emacs@gnu.org; Sat, 16 Jan 2021 15:10:12 -0500 X-Originating-IP: 94.46.225.161 Received: from kronos (unknown [94.46.225.161]) (Authenticated sender: public@protesilaos.com) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 2DF6E1C0002 for ; Sat, 16 Jan 2021 20:10:01 +0000 (UTC) From: Protesilaos Stavrou To: bug-gnu-emacs@gnu.org Subject: 28.0.50; set-face-attribute cannot read :family when different :weight exist Date: Sat, 16 Jan 2021 22:09:54 +0200 Message-ID: <875z3wprsd.fsf@protesilaos.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: none client-ip=217.70.183.197; envelope-from=info@protesilaos.com; helo=relay5-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Dear maintainers, I have noticed that setting fonts via 'set-face-attribute' works as intended except in the following scenario (on 'emacs -Q'): ;; Sample 1 (set-face-attribute 'default nil :family "Source Code Pro" :weight 'light) ;; Sample 2 (set-face-attribute 'default nil :family "Hack" :weight 'normal) If you evaluate sample 1, you will get the desired behaviour. Namely, the font family for the default face is the one specified, as is the typographic weight. Now if you proceed to evaluate sample 2, you will notice that only the weight gets updated. The family continues to be that of sample 1. At this point, to get the family of sample 2, you need to evaluate sample 2 one more time. I tried various combinations and my impression is that the problem occurs when the :weight properties are different. Other properties, such as :height, do not exhibit this behaviour. Can you reproduce this on your end? All the best, Protesilaos -- Protesilaos Stavrou protesilaos.com ------------=_1610854202-2033-1--