Switch between default and big font

This commit is contained in:
Henrik Lissner 2015-10-01 03:41:16 -04:00
parent c27dfd5540
commit 0d523b1819
3 changed files with 22 additions and 4 deletions

View file

@ -45,5 +45,8 @@ gets killed.")
"A list of files that count as 'project files', which determine whether a
folder is the root of a project or not.")
(defcustom narf-big-font (font-spec :family "Ubuntu Mono" :size 18 :antialias t)
"Font to switch to in big mode")
(provide 'core-vars)
;;; core-vars.el ends here

View file

@ -20,10 +20,23 @@
;;;###autoload
(defun narf:toggle-big-mode ()
(interactive)
(if narf--big-mode
(set-frame-font (apply #'font-spec narf-default-font))
(set-frame-font (apply #'font-spec narf-big-font)))
(if narf--big-mode narf/default-font (narf/big-font))
(setq narf--big-mode (not narf--big-mode)))
;;;###autoload
(defun narf/reset-theme ()
(interactive)
(load-theme 'narf-dark t t))
;;;###autoload
(defun narf/default-font ()
(interactive)
(set-frame-font narf-default-font))
;;;###autoload
(defun narf/big-font ()
(interactive)
(set-frame-font narf-big-font))
(provide 'defuns-ui)
;;; defuns-ui.el ends here

View file

@ -48,7 +48,9 @@
(tool-bar-mode -1) ; no toolbar
(menu-bar-mode -1) ; no menubar
(set-frame-font (font-spec :family "terminus (ttf)" :size 12 :antialias nil))
(defconst narf-default-font (font-spec :family "terminus (ttf)" :size 12 :antialias nil))
(defconst narf-big-font (font-spec :family "Ubuntu Mono" :size 18 :antialias t))
(load (concat user-emacs-directory "init-load-path.el"))
(load-theme (if window-system 'narf-dark 'brin) t)
(set-frame-parameter nil 'fullscreen 'fullboth)