平台:windwos和mac以及linux 安装了Noto Serif SC的全套字体以及Source Code Pro全套字体
我现在的设置:
(set-face-attribute 'default nil :font (font-spec :family "Source Code Pro" :size 14))
(set-fontset-font t 'han "Noto Serif SC")
当我在org模式下输入
*某段文字*
时无论中文还是英文都没有正常显示粗体,而是什么也没发生。 下面是网上抄的关于org字体的配置
(defun efs/org-font-setup ()
;; Replace list hyphen with dot
(font-lock-add-keywords 'org-mode
'(("^ *\\([-]\\) "
(0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•"))))))
;; Set faces for heading levels
(dolist (face '((org-level-1 . 1.4)
(org-level-2 . 1.2)
(org-level-3 . 1.05)
(org-level-4 . 2.0)
(org-level-5 . 1.1)
(org-level-6 . 1.1)
(org-level-7 . 1.1)
(org-level-8 . 1.1)))
(set-face-attribute (car face) nil :font "Noto Serif SC" :weight 'bold :height (cdr face)))
;;(set-fontset-font t 'han (font-spec :family "Noto Serif SC" :size 30 :weight 'bold))
;; Ensure that anything that should be fixed-pitch in Org files appears that way
(set-face-attribute 'org-block nil :foreground nil :inherit 'fixed-pitch)
(set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch))
(set-face-attribute 'org-table nil :inherit '(shadow fixed-pitch))
(set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch))
(set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch))
(set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch))
(set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch))
我也希望可以单独设定org mode下heading的字体为粗体。
谢谢。