diff options
author | Aaron LI <aaronly.me@outlook.com> | 2017-02-07 23:15:36 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@outlook.com> | 2017-02-07 23:15:36 +0800 |
commit | 801b70373f7f7985abcb1916b920e462200654ed (patch) | |
tree | 1df9d2d12b8227fe1fb1a485e02b32bed9023896 | |
parent | ecb3fb3e753593b2a278ce2c9a8b2d71dc2930fb (diff) | |
download | dotfiles-801b70373f7f7985abcb1916b920e462200654ed.tar.bz2 |
spacemacs: Set font only after graphical frame initialized
References:
* https://github.com/syl20bnr/spacemacs/issues/6197
* https://github.com/syl20bnr/spacemacs/issues/4816
-rw-r--r-- | _spacemacs.d/init.el | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/_spacemacs.d/init.el b/_spacemacs.d/init.el index c961dfa..97583a1 100644 --- a/_spacemacs.d/init.el +++ b/_spacemacs.d/init.el @@ -452,11 +452,6 @@ ;; Display tildes in the fringe on empty lines (global-vi-tilde-fringe-mode) ;; - ;; Set the font of `variable-pitch' - (set-face-font 'variable-pitch "M+ 1C") - ;; Set monospaced font size for Chinese (from `chinese' layer) - (spacemacs//set-monospaced-font "M+ 1mn" "WenQuanYi Zen Hei" 14 14) - ;; ;; Configure BibTeX completion for `helm-bibtex' (setq bibtex-completion-bibliography '("~/papers/references.bib")) (setq bibtex-completion-library-path "~/papers/") ;; where to find PDFs @@ -479,10 +474,19 @@ ;; ESS: Turn off the automatic replacement of `_' by `<-' (add-hook 'ess-mode-hook (lambda () (ess-toggle-underscore nil))) ;; + ;; Set font only after the first GUI frame initialized, to workaround the + ;; error when Emacs starts in daemon mode. + (spacemacs|do-after-display-system-init + ;; Set the font of `variable-pitch' + (set-face-font 'variable-pitch "M+ 1C") + ;; Set monospaced font size for Chinese (from `chinese' layer) + (spacemacs//set-monospaced-font "M+ 1mn" "WenQuanYi Zen Hei" 14 14) + ) + ;; ;; Load custom configurations (push "~/.spacemacs.d/config" load-path) - (require 'aly-mu4e-config) (require 'aly-org-config) + (require 'aly-mu4e-config) ;; ;; Set custom file location instead of using this file (setq custom-file "~/.spacemacs.d/custom.el") |