From: tfheen Date: Tue, 10 Jun 2008 00:04:36 +0000 (+0000) Subject: Add support for resizing frame X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=880208537a1ac366f2259fc23c41c7d697b807b6;p=dotfiles Add support for resizing frame git-svn-id: file:///svn/tfheen/trunk/dotfiles@1255 8da78d58-1cd3-0310-bee5-d77bd1b3e8bf --- diff --git a/emacs b/emacs index 59f977e..7e2a03a 100644 --- a/emacs +++ b/emacs @@ -354,3 +354,32 @@ (setq gnus-home-directory "~/.emacs.d/gnus" gnus-init-file "~/.gnus" message-directory (concat gnus-home-directory "/Mail"))) + + +(cw/for-host "luxevop" + ;; Firefox-like zooming of fonts. + (setq tfheen-base-font "Bitstream Vera Sans Mono" + tfheen-base-size 12 + tfheen-current-size tfheen-base-size) + + (defun font-zoom-increase-font-size () + (interactive) + (setq tfheen-current-size (+ tfheen-current-size 2)) + (let ((font-name (format "%s-%d" tfheen-base-font tfheen-current-size))) + (set-frame-font font-name))) + + (defun font-zoom-decrease-font-size () + (interactive) + (setq tfheen-current-size (- tfheen-current-size 2)) + (let ((font-name (format "%s-%d" tfheen-base-font tfheen-current-size))) + (set-frame-font font-name))) + + (defun font-zoom-reset-font-size () + (interactive) + (let ((font-name (format "%s-%d" tfheen-base-font tfheen-base-size))) + (set-frame-font font-name))) + + (define-key global-map (read-kbd-macro "C--") 'font-zoom-decrease-font-size) + (define-key global-map (read-kbd-macro "C-+") 'font-zoom-increase-font-size) + (define-key global-map (read-kbd-macro "C-=") 'font-zoom-reset-font-size) + (font-zoom-reset-font-size))