position: 57 of 60 (93%), column: 0
character: (displayed as ) (codepoint 985928, #o3605510, #xf0b48)
charset: unicode (Unicode (ISO10646))
code point in charset: 0xF0B48
syntax: w which means: word
category: L:Strong L2R
to input: type "C-x 8 RET f0b48"
buffer code: #xF3 #xB0 #xAD #x88
file code: #xF3 #xB0 #xAD #x88 (encoded by coding system utf-8)
display: no font available
;; 这不会覆盖之前的符号
(set-fontset-font t nil "Symbols Nerd Font Mono" nil 'append)
;; 这会覆盖之前的符号
(set-fontset-font t nil "Symbols Nerd Font Mono" nil 'prepend)
在找不到字体的时候可以考虑显示一个报错信息。例如,可以使用下面的函数加载字体:
(defvar my/fontset-config
'((t 'han "LXGW Wenkai Mono")
(t 'kana "LXGW Wenkai Mono")
(t nil "Symbols Nerd Font Mono" nil 'append))
"My preferred unicode fonts for specific fontsets.")
(defun my:setup-default-fontset (conf-list)
"A helper for setup fontsets, CONF-LIST is a list of args for `set-fontset-font'."
(dolist (conf conf-list)
(condition-case nil
(eval `(set-fontset-font ,@conf))
(error (message "failed to apply set-fontset-font to %S" conf)))))