unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Heime <heimeborgia@protonmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: :family  and  :height  in set-face-attribute
Date: Mon, 24 Jun 2024 15:39:07 +0000	[thread overview]
Message-ID: <07j6QHJQ4wAP4UfVl54iqBZ9CYUG0fju9zaGZJ1rHyS1D18iP1Mcj3fCg275LwQbywdXakx-CiGut25icmfEV26D2SeUrsqZDDcZNPb9jzU=@protonmail.com> (raw)
In-Reply-To: <86bk3qbbik.fsf@gnu.org>






Sent with Proton Mail secure email.

On Monday, June 24th, 2024 at 3:34 PM, Eli Zaretskii <eliz@gnu.org> wrote:

> > 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?

I use the strings in cseq
 
> Also, is the value of face-family with which you call
> set-face-attribute one of the families returned by font-family-list?
 
Yes they are.  Calling buffer-face-mode-invoke does what is expected to happen.  But not for set-face-attribute.



  reply	other threads:[~2024-06-24 15:39 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
2024-06-24 15:39       ` Heime [this message]
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='07j6QHJQ4wAP4UfVl54iqBZ9CYUG0fju9zaGZJ1rHyS1D18iP1Mcj3fCg275LwQbywdXakx-CiGut25icmfEV26D2SeUrsqZDDcZNPb9jzU=@protonmail.com' \
    --to=heimeborgia@protonmail.com \
    --cc=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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).