feat: emacs - cjk fonts

This commit is contained in:
Ryan Yin
2024-01-06 20:42:48 +08:00
parent b79cc2faf4
commit cabdfd8cb7

View File

@@ -21,11 +21,20 @@
;; See 'C-h v doom-font' for documentation and more examples of what they
;; accept. For example:
;;
(setq doom-font (font-spec :family "JetBrainsMono Nerd Font" :size 17 :weight 'light)
doom-variable-pitch-font (font-spec :family "DejaVu Sans" :size 18)
doom-symbol-font (font-spec :family "JuliaMono")
(setq doom-font (font-spec :family "JetBrainsMono Nerd Font" :size 18 :weight 'normal)
doom-variable-pitch-font (font-spec :family "DejaVu Sans")
doom-symbol-font (font-spec :family "Symbols Nerd Font Mono")
doom-big-font (font-spec :family "JetBrainsMono Nerd Font" :size 28))
;;
;; Users should inject their own font logic in `after-setting-font-hook'
;; Add font for CJK charset
(defun init-cjk-fonts()
(dolist (charset '(kana han cjk-misc bopomofo))
(set-fontset-font (frame-parameter nil 'font)
charset (font-spec :family "Source Han Sans SC"))))
(add-hook 'after-setting-font-hook 'init-cjk-fonts)
;; If you or Emacs can't find your font, use 'M-x describe-font' to look them
;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to
;; refresh your font settings. If Emacs still can't find your font, it likely
@@ -76,14 +85,6 @@
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
;; they are implemented.
(use-package! nerd-icons)
;; :custom
;; The Nerd Font you want to use in GUI
;; "Symbols Nerd Font Mono" is the default and is recommended
;; but you can use any other Nerd Font if you want
;; (nerd-icons-font-family "Symbols Nerd Font Mono")
(use-package! lsp-bridge
:config
(setq lsp-bridge-enable-log nil)