all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: :family  and  :height  in set-face-attribute
Date: Mon, 24 Jun 2024 18:34:11 +0300	[thread overview]
Message-ID: <86bk3qbbik.fsf@gnu.org> (raw)
In-Reply-To: <yl7izESl4dL7BhoKodJtaeJXkzoNBxVet-5E04zFcZSUswklbi5UbeoF3kRFAwyXrv6AZ2x0OcEdbyNJPUPSDhUcLZcM_3vDCf2AegpSTxI=@protonmail.com> (message from Heime on Mon, 24 Jun 2024 14:57:09 +0000)

> Date: Mon, 24 Jun 2024 14:57:09 +0000
> From: Heime <heimeborgia@protonmail.com>
> Cc: help-gnu-emacs@gnu.org
> 
> On Monday, June 24th, 2024 at 12:54 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
> > > Date: Mon, 24 Jun 2024 10:32:25 +0000
> > > From: Heime heimeborgia@protonmail.com
> > > 
> > > I have the following command working
> > > 
> > > (buffer-face-mode-invoke
> > > `(:family ,face-family :height ,(string-to-number face-height)) t)
> > > 
> > > But this one does not
> > > 
> > > (set-face-attribute 'default nil
> > > :family face-family :height (string-to-number face-height))
> > 
> > 
> > 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" "Bold 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)) ))

Come on, can't you just show the values you use in the
set-face-attribute call?

Also, is the value of face-family with which you call
set-face-attribute one of the families returned by font-family-list?



  reply	other threads:[~2024-06-24 15:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-24 10:32 :family and :height in set-face-attribute Heime
2024-06-24 12:54 ` Eli Zaretskii
2024-06-24 14:57   ` Heime
2024-06-24 15:34     ` Eli Zaretskii [this message]
2024-06-24 15:39       ` Heime
2024-06-24 16:29         ` Eli Zaretskii
2024-06-24 17:16           ` Heime

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86bk3qbbik.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.