-
-
Save amalloy/1108145 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 | |
(atom (Font. (if (is-mac) | |
"Monaco" | |
"Courier New") | |
Font/PLAIN default-font-size))) | |
(defn change-font [myfn] | |
(fn [myfont] | |
(let [new-font (swap! myfont | |
(fn [old-font] | |
(let [size (.getSize old-font)] | |
(.deriveFont font (myfn size))))) | |
doc @current-doc] | |
(doseq [area [:doc-text-area :repl-out-text-area :doc-in-text-area]] | |
(.setFont (doc 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