ui/unicode: initialize more intelligently
This commit is contained in:
parent
07867c478d
commit
9b884857f2
1 changed files with 13 additions and 4 deletions
|
@ -1,10 +1,19 @@
|
||||||
;;; ui/unicode/config.el -*- lexical-binding: t; -*-
|
;;; ui/unicode/config.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
(def-package! unicode-fonts
|
(def-package! unicode-fonts
|
||||||
:demand t
|
|
||||||
:init
|
:init
|
||||||
(setq-default bidi-display-reordering t
|
(setq-default bidi-display-reordering t
|
||||||
doom-unicode-font nil)
|
doom-unicode-font nil)
|
||||||
:config
|
|
||||||
;; NOTE will impact startup time on first run
|
(defun +unicode|init-fonts (&optional frame)
|
||||||
(unicode-fonts-setup))
|
"Initialize `unicode-fonts', if in a GUI session."
|
||||||
|
(when (display-graphic-p frame)
|
||||||
|
(with-selected-frame frame
|
||||||
|
(require 'unicode-fonts)
|
||||||
|
;; NOTE will impact startup time on first run
|
||||||
|
(unicode-fonts-setup))))
|
||||||
|
|
||||||
|
(add-hook! 'after-init-hook
|
||||||
|
(if initial-window-system
|
||||||
|
(+unicode|init-fonts)
|
||||||
|
(add-hook 'after-make-frame-functions #'+unicode|init-fonts))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue