about summary refs log tree commit diff stats
path: root/init.el
diff options
context:
space:
mode:
authorCase Duckworth2021-03-30 17:23:36 -0500
committerCase Duckworth2021-03-30 17:30:47 -0500
commit0c1f670cad6a5db85ddcf223a05835e44c221848 (patch)
tree808da1bd87d5bb63f1f75d741fe0d07c787a1e97 /init.el
parentWhitespace (diff)
downloademacs-0c1f670cad6a5db85ddcf223a05835e44c221848.tar.gz
emacs-0c1f670cad6a5db85ddcf223a05835e44c221848.zip
Fix font setting
I wrap it in a function hooked to `after-focus-change-function', from which it
removes itself.  ~Fancy~ stuff.
Diffstat (limited to 'init.el')
-rw-r--r--init.el31
1 files changed, 19 insertions, 12 deletions
diff --git a/init.el b/init.el index 9fd7840..8c60cda 100644 --- a/init.el +++ b/init.el
@@ -234,18 +234,25 @@
234 scroll-preserve-screen-position 1) 234 scroll-preserve-screen-position 1)
235 235
236;; Fonts 236;; Fonts
237(set-face-attribute 'default nil 237;; Load them /after/ the first frame comes into focus
238 :font (pcase acdw/system 238(add-function :after after-focus-change-function
239 (:home "DejaVu Sans Mono-10") 239 (defun hook--setup-fonts ()
240 (:work "Consolas-10") 240 (dolist (face '(default fixed-pitch))
241 (:other "monospace-10"))) 241 ;; `default' and `fixed-pitch' should be the same.
242(set-face-attribute 'fixed-pitch nil 242 (set-face-attribute face nil
243 :inherit 'default) 243 :font (pcase acdw/system
244(set-face-attribute 'variable-pitch nil 244 (:home "DejaVu Sans Mono-10")
245 :font (pcase acdw/system 245 (:work "Consolas-10")
246 (:home "DejaVu Sans") 246 (:other "monospace-10"))))
247 (:work "Calibri-11") 247 ;; `variable-pitch' is, of course, different.
248 (:other "sans-serif"))) 248 (set-face-attribute 'variable-pitch nil
249 :font (pcase acdw/system
250 (:home "DejaVu Sans")
251 (:work "Calibri-11")
252 (:other "sans-serif")))
253 (remove-function after-focus-change-function
254 'hook--setup-fonts)))
255
249 256
250;; MS Windows 257;; MS Windows
251(setc w32-allow-system-shell t 258(setc w32-allow-system-shell t