all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Toggle Fonts without font-menue
@ 2002-09-23 14:50 David Feest
  2002-09-24  0:17 ` Jesper Harder
  0 siblings, 1 reply; 4+ messages in thread
From: David Feest @ 2002-09-23 14:50 UTC (permalink / raw)


Hi!

I use two different types of courier font -- cronyx or adobe --
depending on if I need the Cyrillic letters or the German Umlauts.
Font menue provides a way, of switching fonts on the fly. However, I'd
like to toggle between the fonts through a key-binding. Unfortunately
I haven't managed to find out, which command is responsible for font
change.

Thanks in advance, 

David

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

* Re: Toggle Fonts without font-menue
  2002-09-23 14:50 Toggle Fonts without font-menue David Feest
@ 2002-09-24  0:17 ` Jesper Harder
  2002-09-25  8:04   ` David Feest
  0 siblings, 1 reply; 4+ messages in thread
From: Jesper Harder @ 2002-09-24  0:17 UTC (permalink / raw)


david.feest@snafu.de (David Feest) writes:

> I use two different types of courier font -- cronyx or adobe --
> depending on if I need the Cyrillic letters or the German Umlauts.
> Font menue provides a way, of switching fonts on the fly.

Hmm, the best solution would probably be to define a fontset so you
don't need to switch at all.

> However, I'd like to toggle between the fonts through a
> key-binding. Unfortunately I haven't managed to find out, which
> command is responsible for font change.

`M-x set-default-font'

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

* Re: Toggle Fonts without font-menue
  2002-09-24  0:17 ` Jesper Harder
@ 2002-09-25  8:04   ` David Feest
  2002-09-25 17:45     ` Ivan Kanis
  0 siblings, 1 reply; 4+ messages in thread
From: David Feest @ 2002-09-25  8:04 UTC (permalink / raw)


Hi!

Jesper Harder <harder@myrealbox.com> wrote in message news:<m3ptv4ckbx.fsf@defun.localdomain>...
> david.feest@snafu.de (David Feest) writes:
> 
> > I use two different types of courier font -- cronyx or adobe --
> > depending on if I need the Cyrillic letters or the German Umlauts.
> > Font menue provides a way, of switching fonts on the fly.
> 
> Hmm, the best solution would probably be to define a fontset so you
> don't need to switch at all.
> 
> > However, I'd like to toggle between the fonts through a
> > key-binding. Unfortunately I haven't managed to find out, which
> > command is responsible for font change.
> 
> `M-x set-default-font'

Well yes, the fontset solution is probably more elegant! But I'm not
really an expert in these things and simply switching the default is
an easy way of
obtaining my goal. Thanks a lot for the help! 

David

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

* Re: Toggle Fonts without font-menue
  2002-09-25  8:04   ` David Feest
@ 2002-09-25 17:45     ` Ivan Kanis
  0 siblings, 0 replies; 4+ messages in thread
From: Ivan Kanis @ 2002-09-25 17:45 UTC (permalink / raw)



    David> Well yes, the fontset solution is probably more elegant!
    David> But I'm not really an expert in these things and simply
    David> switching the default is an easy way of obtaining my
    David> goal.

Well I am embarassed to post this code here because it is butt
ugly. It seems to do what you want. You just need to replace "fixed"
and "adobe-...." with the fonts you need. It is bound to C-c j but you
can bind to whatever key combination you want. Hope you find it
useful.

(global-set-key "\C-cj" 'my-toggle-font)

; Toggle between large and small font, the large font is useful for reading
; Japanese
(setq ivan-fixed-font t)

(defun my-toggle-font()
(interactive)
(if (eval 'ivan-fixed-font)
	(progn
	  (set-frame-font "-adobe-courier-medium-r-normal--*-240-*-*-m-*-iso8859-1")
	  ;; TBD remove hard coded value!
	  (set-frame-height (selected-frame) 47)
	  (setq ivan-fixed-font nil))
  (progn
	(set-frame-font "fixed")
	  ;; TBD remove hard coded value!
	  (set-frame-height (selected-frame) 87)
	(setq ivan-fixed-font t))))

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

end of thread, other threads:[~2002-09-25 17:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-23 14:50 Toggle Fonts without font-menue David Feest
2002-09-24  0:17 ` Jesper Harder
2002-09-25  8:04   ` David Feest
2002-09-25 17:45     ` Ivan Kanis

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.