Emacs: Changing the font size on the fly
Posted on September 15th, 2006 by Sacha Chua
More posts about: emacs Tags: highlight // 13 Comments »
More posts about: emacs Tags: highlight // 13 Comments »
I have a tiny laptop: 8.9″ diagonally. With a 1024×768 pixels screen
resolution, things can get *pretty* small. The following functions use
the gnome-terminal-style shortcuts (Ctrl-plus, Ctrl-minus) to change
the font size without the mouse:
(defun sacha/increase-font-size () (interactive) (set-face-attribute 'default nil :height (ceiling (* 1.10 (face-attribute 'default :height))))) (defun sacha/decrease-font-size () (interactive) (set-face-attribute 'default nil :height (floor (* 0.9 (face-attribute 'default :height))))) (global-set-key (kbd "C-+") 'sacha/increase-font-size) (global-set-key (kbd "C--") 'sacha/decrease-font-size)
On Technorati: emacs, pimpmyemacs
One Pingback/Trackback
- 14 July 2009 at 10:07am
- Cómo cambiar al vuelo el tamaño del texto en Emacs | lobo_tuerto
[...] Emacs: Changing the font size on the fly ...