all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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 14:57:09 +0000	[thread overview]
Message-ID: <yl7izESl4dL7BhoKodJtaeJXkzoNBxVet-5E04zFcZSUswklbi5UbeoF3kRFAwyXrv6AZ2x0OcEdbyNJPUPSDhUcLZcM_3vDCf2AegpSTxI=@protonmail.com> (raw)
In-Reply-To: <86h6dibixi.fsf@gnu.org>






Sent with Proton Mail secure email.

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





  reply	other threads:[~2024-06-24 14:57 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 [this message]
2024-06-24 15:34     ` Eli Zaretskii
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='yl7izESl4dL7BhoKodJtaeJXkzoNBxVet-5E04zFcZSUswklbi5UbeoF3kRFAwyXrv6AZ2x0OcEdbyNJPUPSDhUcLZcM_3vDCf2AegpSTxI=@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.
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.