Skip to content

Instantly share code, notes, and snippets.

@jtimberman
Forked from arnab/dynamic-fonts.el
Last active May 23, 2016 17:08
Show Gist options
  • Save jtimberman/bac0515670004ba0eeee0af5db26c43c to your computer and use it in GitHub Desktop.
Save jtimberman/bac0515670004ba0eeee0af5db26c43c to your computer and use it in GitHub Desktop.

Revisions

  1. @arnab arnab revised this gist Sep 24, 2012. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion dynamic-fonts.el
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    ;; Gist-ed from in https://github.com/arnab/emacs-starter-kit

    (defun fontify-frame (frame)
    (interactive)
    (if window-system
    @@ -10,4 +12,4 @@
    (fontify-frame nil)

    ;; Fontify any future frames
    (push 'fontify-frame after-make-frame-functions)
    (push 'fontify-frame after-make-frame-functions)
  2. @arnab arnab created this gist Sep 24, 2012.
    13 changes: 13 additions & 0 deletions dynamic-fonts.el
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    (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)