Advertisement
hnOsmium0001

emacs org mode only cjkv font

Aug 7th, 2022
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. (defun org-buffer-face-mode-variable ()
  2. (interactive)
  3. (let ((fontset-monospace-cjkv (create-fontset-from-fontset-spec
  4. (concat "-*-*-*-*-*--*-*-*-*-*-*-fontset-monospacecjkv"
  5. ""))))
  6. (dolist (charset '(latin kana han cjk-misc bopomofo))
  7. (set-fontset-font fontset-monospace-cjkv
  8. charset
  9. (font-spec :family "Sarasa Mono SC" :size 18)))
  10. (make-face 'org-cjkv)
  11. (set-face-attribute 'org-cjkv nil
  12. ;;:font fontset-monospace-cjkv
  13. :fontset fontset-monospace-cjkv)
  14. (setq buffer-face-mode-face 'org-cjkv)
  15. (buffer-face-mode)))
  16. (add-hook 'org-mode-hook 'org-buffer-face-mode-variable)
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement