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 14:57:09 +0000 Message-ID: References: <86h6dibixi.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="27322"; 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 16:57:50 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 1sLl8g-0006tP-2y for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 24 Jun 2024 16:57:50 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLl8A-0002GV-Dd; Mon, 24 Jun 2024 10:57:18 -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 1sLl88-0002G6-Vw for help-gnu-emacs@gnu.org; Mon, 24 Jun 2024 10:57:17 -0400 Original-Received: from mail-40130.protonmail.ch ([185.70.40.130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLl87-0002Ld-25; Mon, 24 Jun 2024 10:57:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1719241032; x=1719500232; bh=jfoNqCk6T8Zp5Mtia6x69aiusVD4sCJjP5g+iOV9mYs=; 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=p8z8SUZowjfpNRX0wzUqShDkW39t3ou39T32q5YozNS9R3ZrGBeL3NlSXNQXQXXxB pepk3zOV12qiYshAg8L10Y/NVmK1ryynFE5VJMmFFNKckaMqZKxBm11jfUiiCKh6Xw w2vSRlA4zV6SfrKhqoHJPrKJ4ME8ZZfKpCnJXy+VwBSrvuUAAptOk5Czt0WRh0cmS4 +rJrCvvzb0QifRIgq3aNVz6NvhNdOLbHEKOdzj5cg/ltEsglhhtio1rtPHnlu0Ma8N /irjhOqmn30jTJdjPIOgcgqa+ZwU5S+CoIb/PnQ/KO0yq2H/9Zdguw2+lzgkG5eGtZ +y8YAAA69RzLw== In-Reply-To: <86h6dibixi.fsf@gnu.org> Feedback-ID: 57735886:user:proton X-Pm-Message-ID: 84ee39f866355aecd669233128c0f73d59c63788 Received-SPF: pass client-ip=185.70.40.130; envelope-from=heimeborgia@protonmail.com; helo=mail-40130.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_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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:146981 Archived-At: Sent with Proton Mail secure email. On Monday, June 24th, 2024 at 12:54 PM, Eli Zaretskii wrote: > > 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 >=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. This is it (defvar monatt nil "A boolean variable that is true by default.") (defun monfont (face-family face-height) (interactive (list (let ( (cseq '("Wargames" "URW Chancery L" "Century Schoolbook L" "Bo= ld Oblique")) ) (completing-read " Family Name: " cseq nil t "Bold Oblique")) (let ( (hseq '("340" "300" "260" "220" "180")) ) (completing-read " Face Height: " hseq nil t "180")) )) (if monatt (buffer-face-mode-invoke `(:family ,face-family :height ,(string-to-number face-height)) t) (set-face-attribute 'default nil :family face-family :height (string-to-number face-height)) ))