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; -*-
|
||||
|
||||
(def-package! unicode-fonts
|
||||
:demand t
|
||||
:init
|
||||
(setq-default bidi-display-reordering t
|
||||
doom-unicode-font nil)
|
||||
:config
|
||||
|
||||
(defun +unicode|init-fonts (&optional frame)
|
||||
"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))
|
||||
(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