Created
September 24, 2012 04:08
-
-
Save arnab/3774147 to your computer and use it in GitHub Desktop.
Dynamically adjust fonts in emacs based on screen resolution (Retina vs. Thunderbolt)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Gist-ed from in https://github.com/arnab/emacs-starter-kit | |
(defun fontify-frame (frame) | |
(interactive) | |
(if window-system | |
(progn | |
(if (> (x-display-pixel-width) 2000) | |
(set-frame-parameter frame 'font "Inconsolata 19") ;; Cinema Display | |
(set-frame-parameter frame 'font "Inconsolata 16"))))) | |
;; Fontify current frame | |
(fontify-frame nil) | |
;; Fontify any future frames | |
(push 'fontify-frame after-make-frame-functions) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment