Improve unicode, emoji, & symbol font support

+ Adds doom-emoji-fallback-font-families
+ Adds doom-symbol-fallback-font-families
+ Gives doom-unicode-font higher precedence (and sets it to nil by
  default, since Emacs defaults to symbola already).
+ Store custom face settings in psuedo theme, rather than crowding the
  user theme (which may be immortalized to custom-file, which we want to
  avoid).
+ Now, after-setting-font-hook is guaranteed to fire after *all* fonts
  are set, giving you a more reliable interface to add your own
  font(set) modifications.

More testing is needed to ensure the patched fonts our ligatures modules
don't conflict with this change.
This commit is contained in:
Henrik Lissner 2021-05-06 04:06:19 -04:00
parent b63441387b
commit d4dec35658
3 changed files with 56 additions and 52 deletions

View file

@ -73,8 +73,7 @@ See `doom-init-fonts-h'."
(interactive)
(when doom-font
(set-frame-font doom-font t))
(doom-init-fonts-h)
(mapc #'doom-init-extra-fonts-h (frame-list)))
(doom-init-fonts-h))
;;;###autoload
(defun doom/increase-font-size (count)
@ -116,7 +115,8 @@ This uses `doom/increase-font-size' under the hood, and enlargens the font by
:lighter " BIG"
:global t
(unless doom-font
(user-error "`doom-font' must be set to a valid font"))
(or (setq doom-font (face-attribute 'default :font))
(user-error "`doom-font' must be set to a valid font")))
(if doom-big-font
(let ((font (if doom-big-font-mode doom-big-font doom-font)))
(set-frame-font font 'keep-size t)