Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Dynamically adjust fonts in emacs based on screen resolution (Retina vs. Thunderbolt)
;; 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