From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Heime Newsgroups: gmane.emacs.help Subject: Re: :family and :height in set-face-attribute Date: Mon, 24 Jun 2024 15:39:07 +0000 Message-ID: <07j6QHJQ4wAP4UfVl54iqBZ9CYUG0fju9zaGZJ1rHyS1D18iP1Mcj3fCg275LwQbywdXakx-CiGut25icmfEV26D2SeUrsqZDDcZNPb9jzU=@protonmail.com> References: <86h6dibixi.fsf@gnu.org> <86bk3qbbik.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="39776"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 24 17:39:52 2024 Return-path: Envelope-to: geh-help-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 1sLlnL-000A98-J1 for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 24 Jun 2024 17:39:51 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLlmq-0001hS-2e; Mon, 24 Jun 2024 11:39:20 -0400 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 1sLlmo-0001h9-RX for help-gnu-emacs@gnu.org; Mon, 24 Jun 2024 11:39:18 -0400 Original-Received: from mail-4319.protonmail.ch ([185.70.43.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLlml-0002FS-Vl; Mon, 24 Jun 2024 11:39:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1719243552; x=1719502752; bh=ykf1AhSpONr3KVKszuL5m3RVNH3OgQhnFV0t22+TRHc=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=wUycDo6cV4KRg6gYqO6u2w9eSWwcyNuJoan16OshqTeHsCuc9vHCSigIzlS5h3WYC Jrg0leWOoDFnO7s8oApIWA2CFnpKmJDyll11eQ6Zlk4RKBKBMrS5U0zWqPZNHn9adW L56bbgdYPCdq7cCY0sOWFn81IoRTgOx8MmlUo7JMWKD1taszJqeVeDeY4dMSEg95Nj qOu9POAzzrqWNMUT6OriNZ1ZGjyddP07zq9GCzm+GFIFL3/qcyAJLN83UTAzpp8BAS 6K9gndPII2w7YxSHzOHiU4TgxnyfEwKeB+p1e7d0ozlPRrxWwq4q91hGT3JHNAAwbn aVUZ0EZ/pY2yA== In-Reply-To: <86bk3qbbik.fsf@gnu.org> Feedback-ID: 57735886:user:proton X-Pm-Message-ID: e59078dfd62533bcfa168651c5069cd50911377a Received-SPF: pass client-ip=185.70.43.19; envelope-from=heimeborgia@protonmail.com; helo=mail-4319.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:146983 Archived-At: Sent with Proton Mail secure email. On Monday, June 24th, 2024 at 3:34 PM, Eli Zaretskii wrote: > > Date: Mon, 24 Jun 2024 14:57:09 +0000 > > From: Heime heimeborgia@protonmail.com > > Cc: help-gnu-emacs@gnu.org > >=20 > > On Monday, June 24th, 2024 at 12:54 PM, Eli Zaretskii eliz@gnu.org wrot= e: > >=20 > > > > Date: Mon, 24 Jun 2024 10:32:25 +0000 > > > > From: Heime heimeborgia@protonmail.com > > > >=20 > > > > I have the following command working > > > >=20 > > > > (buffer-face-mode-invoke > > > > `(:family ,face-family :height ,(string-to-number face-height)) t) > > > >=20 > > > > But this one does not > > > >=20 > > > > (set-face-attribute 'default nil > > > > :family face-family :height (string-to-number face-height)) > > >=20 > > > Works for me. But since you haven't shown the values of face-family > > > and face-height, it's hard to tell whether I reproduced what you do. > >=20 > > This is it > >=20 > > (defvar monatt nil > > "A boolean variable that is true by default.") > >=20 > > (defun monfont (face-family face-height) > >=20 > > (interactive > >=20 > > (list > >=20 > > (let ( (cseq '("Wargames" "URW Chancery L" "Century Schoolbook L" "Bold= Oblique")) ) > >=20 > > (completing-read " Family Name: " cseq nil t "Bold Oblique")) > >=20 > > (let ( (hseq '("340" "300" "260" "220" "180")) ) > >=20 > > (completing-read " Face Height: " hseq nil t "180")) )) > >=20 > > (if monatt > >=20 > > (buffer-face-mode-invoke > >=20 > > `(:family ,face-family :height ,(string-to-number face-height)) t) > >=20 > > (set-face-attribute 'default nil > >=20 > > :family face-family :height (string-to-number face-height)) )) >=20 >=20 > Come on, can't you just show the values you use in the > set-face-attribute call? I use the strings in cseq =20 > Also, is the value of face-family with which you call > set-face-attribute one of the families returned by font-family-list? =20 Yes they are. Calling buffer-face-mode-invoke does what is expected to hap= pen. But not for set-face-attribute.