2018-05-25 00:46:11 +02:00
|
|
|
;;; ui/unicode/autoload.el -*- lexical-binding: t; -*-
|
|
|
|
|
|
|
|
;;;###autoload
|
2019-03-04 20:35:47 -05:00
|
|
|
(add-hook 'doom-init-ui-hook #'+unicode|init-fonts)
|
2018-05-25 00:46:11 +02:00
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun +unicode|init-fonts ()
|
|
|
|
"Set up `unicode-fonts' to eventually run; accomodating the daemon, if
|
|
|
|
necessary."
|
|
|
|
(setq-default bidi-display-reordering t
|
|
|
|
doom-unicode-font nil)
|
|
|
|
(if initial-window-system
|
|
|
|
(+unicode|setup-fonts (selected-frame))
|
|
|
|
(add-hook 'after-make-frame-functions #'+unicode|setup-fonts)))
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun +unicode|setup-fonts (&optional frame)
|
|
|
|
"Initialize `unicode-fonts', if in a GUI session."
|
|
|
|
(when (and frame (display-graphic-p frame))
|
|
|
|
(with-selected-frame frame
|
|
|
|
(require 'unicode-fonts)
|
|
|
|
;; NOTE will impact startup time on first run
|
|
|
|
(unicode-fonts-setup))))
|