Created
July 26, 2011 21:39
-
-
Save anonymous/1108130 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(def mono-font | |
(if (is-mac) | |
(agent (Font. "Monaco" Font/PLAIN default-font-size)) | |
(agent (Font. "Courier New" Font/PLAIN default-font-size)))) | |
(defn change-font [myfn] | |
(fn [myfont] | |
(let [new-font (Font. "Monaco" Font/PLAIN (myfn (.getSize @mono-font)))] | |
(send-off myfont | |
(fn [old-font] new-font)) | |
(do | |
(.setFont (@current-doc :doc-text-area) new-font) | |
(.setFont (@current-doc :repl-out-text-area) new-font) | |
(.setFont (@current-doc :doc-in-text-area) new-font))))) | |
(def inc-font (change-font inc)) | |
(def dec-font (change-font dec)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment