all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Change font for buffer
@ 2024-06-21 21:49 Heime
  2024-06-22  1:41 ` Heime
  2024-06-22  7:07 ` Eli Zaretskii
  0 siblings, 2 replies; 12+ messages in thread
From: Heime @ 2024-06-21 21:49 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor

How can I change the font used by emacs for a buffer.  Is there
a way to get a some of the font available that I can loop through using elisp code, as one can do in open-office ? 




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Change font for buffer
  2024-06-21 21:49 Change font for buffer Heime
@ 2024-06-22  1:41 ` Heime
  2024-06-22  7:07 ` Eli Zaretskii
  1 sibling, 0 replies; 12+ messages in thread
From: Heime @ 2024-06-22  1:41 UTC (permalink / raw)
  To: Heime; +Cc: Heime via Users list for the GNU Emacs text editor

On Friday, June 21st, 2024 at 9:49 PM, Heime <heimeborgia@protonmail.com> wrote:

> How can I change the font used by emacs for a buffer. Is there
> a way to get a some of the font available that I can loop through using elisp code, as one can do in open-office ?

I would like to use URW Chancery

Doing 

fc-list | sort | uniq | grep -i Chancery

gives

/usr/share/fonts/type1/gsfonts/z003034l.pfb: URW Chancery L:style=Medium Italic

and

/usr/share/fonts/X11/Type1/z003034l.pfb: URW Chancery L:style=Medium Italic







^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Change font for buffer
  2024-06-21 21:49 Change font for buffer Heime
  2024-06-22  1:41 ` Heime
@ 2024-06-22  7:07 ` Eli Zaretskii
  2024-06-22  9:05   ` Heime
  1 sibling, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2024-06-22  7:07 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Fri, 21 Jun 2024 21:49:46 +0000
> From: Heime <heimeborgia@protonmail.com>
> 
> How can I change the font used by emacs for a buffer.  Is there
> a way to get a some of the font available that I can loop through using elisp code, as one can do in open-office ? 

Interactively, use S-mouse-1.

In Lisp, use buffer-face-mode-invoke.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Change font for buffer
  2024-06-22  7:07 ` Eli Zaretskii
@ 2024-06-22  9:05   ` Heime
  2024-06-22  9:52     ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Heime @ 2024-06-22  9:05 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs


On Saturday, June 22nd, 2024 at 7:07 AM, Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Fri, 21 Jun 2024 21:49:46 +0000
> > From: Heime heimeborgia@protonmail.com
> > 
> > How can I change the font used by emacs for a buffer. Is there
> > a way to get a some of the font available that I can loop through using elisp code, as one can do in open-office ?
> 
> 
> Interactively, use S-mouse-1.
> 
> In Lisp, use buffer-face-mode-invoke.

What command can I use to change the buffer face to URW Chancery ?



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Change font for buffer
  2024-06-22  9:05   ` Heime
@ 2024-06-22  9:52     ` Eli Zaretskii
  2024-06-22 10:38       ` Heime
  0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2024-06-22  9:52 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Sat, 22 Jun 2024 09:05:33 +0000
> From: Heime <heimeborgia@protonmail.com>
> Cc: help-gnu-emacs@gnu.org
> 
> 
> On Saturday, June 22nd, 2024 at 7:07 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
> > > Date: Fri, 21 Jun 2024 21:49:46 +0000
> > > From: Heime heimeborgia@protonmail.com
> > > 
> > > How can I change the font used by emacs for a buffer. Is there
> > > a way to get a some of the font available that I can loop through using elisp code, as one can do in open-office ?
> > 
> > 
> > Interactively, use S-mouse-1.
> > 
> > In Lisp, use buffer-face-mode-invoke.
> 
> What command can I use to change the buffer face to URW Chancery ?

One of the above, as I just suggested.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Change font for buffer
  2024-06-22  9:52     ` Eli Zaretskii
@ 2024-06-22 10:38       ` Heime
  2024-06-22 10:54         ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Heime @ 2024-06-22 10:38 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs


On Saturday, June 22nd, 2024 at 9:52 AM, Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Sat, 22 Jun 2024 09:05:33 +0000
> > From: Heime heimeborgia@protonmail.com
> > Cc: help-gnu-emacs@gnu.org
> > 
> > On Saturday, June 22nd, 2024 at 7:07 AM, Eli Zaretskii eliz@gnu.org wrote:
> > 
> > > > Date: Fri, 21 Jun 2024 21:49:46 +0000
> > > > From: Heime heimeborgia@protonmail.com
> > > > 
> > > > How can I change the font used by emacs for a buffer. Is there
> > > > a way to get a some of the font available that I can loop through using elisp code, as one can do in open-office ?
> > > 
> > > Interactively, use S-mouse-1.
> > > 
> > > In Lisp, use buffer-face-mode-invoke.
> > 
> > What command can I use to change the buffer face to URW Chancery ?
> 
> 
> One of the above, as I just suggested.

What is the difference to using this instead ?

(set-face-attribute 'default nil :font "URW Chancery L-12")






^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Change font for buffer
  2024-06-22 10:38       ` Heime
@ 2024-06-22 10:54         ` Eli Zaretskii
  2024-06-22 15:19           ` Heime
  0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2024-06-22 10:54 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Sat, 22 Jun 2024 10:38:29 +0000
> From: Heime <heimeborgia@protonmail.com>
> Cc: help-gnu-emacs@gnu.org
> 
> 
> On Saturday, June 22nd, 2024 at 9:52 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
> > > > Interactively, use S-mouse-1.
> > > > 
> > > > In Lisp, use buffer-face-mode-invoke.
> > > 
> > > What command can I use to change the buffer face to URW Chancery ?
> > 
> > 
> > One of the above, as I just suggested.
> 
> What is the difference to using this instead ?
> 
> (set-face-attribute 'default nil :font "URW Chancery L-12")

It isn't buffer-local, and you wanted the change for a specific
buffer, AFAIU.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Change font for buffer
  2024-06-22 10:54         ` Eli Zaretskii
@ 2024-06-22 15:19           ` Heime
  2024-06-22 16:08             ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Heime @ 2024-06-22 15:19 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs






Sent with Proton Mail secure email.

On Saturday, June 22nd, 2024 at 10:54 AM, Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Sat, 22 Jun 2024 10:38:29 +0000
> > From: Heime heimeborgia@protonmail.com
> > Cc: help-gnu-emacs@gnu.org
> > 
> > On Saturday, June 22nd, 2024 at 9:52 AM, Eli Zaretskii eliz@gnu.org wrote:
> > 
> > > > > Interactively, use S-mouse-1.
> > > > > 
> > > > > In Lisp, use buffer-face-mode-invoke.
> > > > 
> > > > What command can I use to change the buffer face to URW Chancery ?
> > > 
> > > One of the above, as I just suggested.
> > 
> > What is the difference to using this instead ?
> > 
> > (set-face-attribute 'default nil :font "URW Chancery L-12")
> 
> 
> It isn't buffer-local, and you wanted the change for a specific
> buffer, AFAIU.

Have looked at the docstring, but it is not very clear to me how to call it
exactly.

(buffer-face-mode-invoke "URW Chancery L-12" t)



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Change font for buffer
  2024-06-22 15:19           ` Heime
@ 2024-06-22 16:08             ` Eli Zaretskii
  2024-06-22 19:47               ` Heime
  0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2024-06-22 16:08 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Sat, 22 Jun 2024 15:19:14 +0000
> From: Heime <heimeborgia@protonmail.com>
> Cc: help-gnu-emacs@gnu.org
> 
> > > What is the difference to using this instead ?
> > > 
> > > (set-face-attribute 'default nil :font "URW Chancery L-12")
> > 
> > 
> > It isn't buffer-local, and you wanted the change for a specific
> > buffer, AFAIU.
> 
> Have looked at the docstring, but it is not very clear to me how to call it
> exactly.
> 
> (buffer-face-mode-invoke "URW Chancery L-12" t)

Try

  (buffer-face-mode-invoke '(:family "URW Chancery L-12") t)



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Change font for buffer
  2024-06-22 16:08             ` Eli Zaretskii
@ 2024-06-22 19:47               ` Heime
  2024-06-23  0:10                 ` Michael Heerdegen via Users list for the GNU Emacs text editor
  2024-06-23  4:34                 ` Eli Zaretskii
  0 siblings, 2 replies; 12+ messages in thread
From: Heime @ 2024-06-22 19:47 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

On Saturday, June 22nd, 2024 at 4:08 PM, Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Sat, 22 Jun 2024 15:19:14 +0000
> > From: Heime heimeborgia@protonmail.com
> > Cc: help-gnu-emacs@gnu.org
> > 
> > > > What is the difference to using this instead ?
> > > > 
> > > > (set-face-attribute 'default nil :font "URW Chancery L-12")
> > > 
> > > It isn't buffer-local, and you wanted the change for a specific
> > > buffer, AFAIU.
> > 
> > Have looked at the docstring, but it is not very clear to me how to call it
> > exactly.
> > 
> > (buffer-face-mode-invoke "URW Chancery L-12" t)
> 
> 
> Try
> 
> (buffer-face-mode-invoke '(:family "URW Chancery L-12") t)

The command 

(buffer-face-mode-invoke '(:family "URW Chancery L-12") t)

gives me 

Debugger entered--Lisp error: (void-function buffer-face-mode-invoke)
  (buffer-face-mode-invoke '(:family "URW Chancery L-12") t)

Have used the command 

fc-list | sort | uniq | grep -i Chancery

to give me the list

/usr/share/fonts/type1/gsfonts/z003034l.pfb: URW Chancery L:style=Medium Italic

/usr/share/fonts/X11/Type1/z003034l.pfb: URW Chancery L:style=Medium Italic



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Change font for buffer
  2024-06-22 19:47               ` Heime
@ 2024-06-23  0:10                 ` Michael Heerdegen via Users list for the GNU Emacs text editor
  2024-06-23  4:34                 ` Eli Zaretskii
  1 sibling, 0 replies; 12+ messages in thread
From: Michael Heerdegen via Users list for the GNU Emacs text editor @ 2024-06-23  0:10 UTC (permalink / raw)
  To: help-gnu-emacs

Heime <heimeborgia@protonmail.com> writes:

> (buffer-face-mode-invoke '(:family "URW Chancery L-12") t)
>
> gives me 
>
> Debugger entered--Lisp error: (void-function buffer-face-mode-invoke)

Please (require 'face-remap) before evaluating.  The function is not
autoloaded.


Michael.




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Change font for buffer
  2024-06-22 19:47               ` Heime
  2024-06-23  0:10                 ` Michael Heerdegen via Users list for the GNU Emacs text editor
@ 2024-06-23  4:34                 ` Eli Zaretskii
  1 sibling, 0 replies; 12+ messages in thread
From: Eli Zaretskii @ 2024-06-23  4:34 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Sat, 22 Jun 2024 19:47:07 +0000
> From: Heime <heimeborgia@protonmail.com>
> Cc: help-gnu-emacs@gnu.org
> 
> On Saturday, June 22nd, 2024 at 4:08 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
> > Try
> > 
> > (buffer-face-mode-invoke '(:family "URW Chancery L-12") t)
> 
> The command 
> 
> (buffer-face-mode-invoke '(:family "URW Chancery L-12") t)
> 
> gives me 
> 
> Debugger entered--Lisp error: (void-function buffer-face-mode-invoke)
>   (buffer-face-mode-invoke '(:family "URW Chancery L-12") t)

You need to load face-remap.el first, which is where this function is
defined.



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-06-23  4:34 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-21 21:49 Change font for buffer Heime
2024-06-22  1:41 ` Heime
2024-06-22  7:07 ` Eli Zaretskii
2024-06-22  9:05   ` Heime
2024-06-22  9:52     ` Eli Zaretskii
2024-06-22 10:38       ` Heime
2024-06-22 10:54         ` Eli Zaretskii
2024-06-22 15:19           ` Heime
2024-06-22 16:08             ` Eli Zaretskii
2024-06-22 19:47               ` Heime
2024-06-23  0:10                 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-06-23  4:34                 ` Eli Zaretskii

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.