refactor: doom-unicode-font -> doom-symbol-font

No font supports all of Unicode or anywhere near it. It’s not even
really possible with current font formats. Therefore, rename
`doom-unicode-font` to `doom-symbol-font`. Only set it as a fallback for
characters in the `symbol` and `mathematical` scripts.
This commit is contained in:
Liam Hupfer 2023-09-24 21:39:01 -05:00 committed by Henrik Lissner
parent 1cc7b04059
commit 4499ce7b0a
8 changed files with 30 additions and 28 deletions

View file

@ -12,14 +12,14 @@ necessary."
(defun +unicode-setup-fonts-h (&optional frame)
"Initialize `unicode-fonts', if in a GUI session.
If doom-unicode-font is set, add it as preferred font for all unicode blocks."
If doom-symbol-font is set, add it as a preferred font for all Unicode blocks."
(when (and frame (display-multi-font-p frame))
(with-selected-frame frame
(require 'unicode-fonts)
(when doom-unicode-font
(let ((doom-unicode-font-family (plist-get (font-face-attributes doom-unicode-font) :family)))
(when doom-symbol-font
(let ((doom-symbol-font-family (plist-get (font-face-attributes doom-symbol-font) :family)))
(dolist (unicode-block unicode-fonts-block-font-mapping)
(push doom-unicode-font-family (cadr unicode-block)))))
(push doom-symbol-font-family (cadr unicode-block)))))
;; NOTE: will impact startup time on first run
(let (inhibit-redisplay inhibit-message)
(unicode-fonts-setup)))))