help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing the default font on the fly


From: Thien-Thi Nguyen
Subject: Re: Changing the default font on the fly
Date: Sun, 24 Jun 2012 02:11:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

() Eddie <penguinismo@almostconnecticut.net>
() Sat, 23 Jun 2012 18:50:09 -0400

   (set-frame-font
       "-unknown-Droid Sans
   Mono-normal-normal-normal-*-*-*-*-*-m-0-iso10646-1")

   and

   (set-frame-font
       "-unknown-Carmina Md
   BT-normal-normal-normal-*-*-*-*-*-*-0-iso10646-1")

These are expressions.  You can make them commands (one of which
you already know: ‘typopunct-mode’) by placing a:

 ;; -*- emacs-lisp -*-
 (defun COMMAND-NAME () DOCSTRING (interactive) EXPRESSION)

in ~/.emacs (or rather, two of them).  For example:

 (defun use-droid-font ()
   "Set the frame font to Droid Sans Mono."
   (interactive)
   (set-frame-font "-unknown-Droid Sans 
Mono-normal-normal-normal-*-*-*-*-*-m-0-iso10646-1"))

 (defun use-carmina-font ()
   "Set the frame font to Carmina Md BT."
   (interactive)
   (set-frame-font "-unknown-Carmina Md 
BT-normal-normal-normal-*-*-*-*-*-*-0-iso10646-1"))

Lastly, make keybindings to taste and you are done, and can demonstrably
call yourself a programmer.  Welcome, a world of bug creation awaits!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]