Update module to conform to doom-emacs style
- Fix Readme.org alignment and metadata - Add unicode-font to "Plugins" section - Remove empty "Hacks" section - Inline +unicode--add-doom-unicode-font
This commit is contained in:
parent
6040feaa9a
commit
e26d69f39b
2 changed files with 11 additions and 16 deletions
|
@ -1,13 +1,5 @@
|
|||
;;; ui/unicode/autoload.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload
|
||||
(defun +unicode--add-doom-unicode-font ()
|
||||
"Include doom-unicode font as the top suggested font for unicode glyphs for all blocks"
|
||||
(when doom-unicode-font
|
||||
(let ((doom-unicode-font-family (plist-get (font-face-attributes doom-unicode-font) :family)))
|
||||
(dolist (unicode-block unicode-fonts-block-font-mapping)
|
||||
(push doom-unicode-font-family (cadr unicode-block))))))
|
||||
|
||||
;;;###autoload
|
||||
(add-hook! 'doom-init-ui-hook
|
||||
(defun +unicode-init-fonts-h ()
|
||||
|
@ -21,10 +13,15 @@ necessary."
|
|||
|
||||
;;;###autoload
|
||||
(defun +unicode-setup-fonts-h (&optional frame)
|
||||
"Initialize `unicode-fonts', if in a GUI session."
|
||||
"Initialize `unicode-fonts', if in a GUI session.
|
||||
|
||||
If doom-unicode-font is set, add it as preferred font for all unicode blocks."
|
||||
(when (and frame (display-graphic-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)))
|
||||
(dolist (unicode-block unicode-fonts-block-font-mapping)
|
||||
(push doom-unicode-font-family (cadr unicode-block)))))
|
||||
;; NOTE will impact startup time on first run
|
||||
(+unicode--add-doom-unicode-font)
|
||||
(unicode-fonts-setup))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue