有人在org模式下用mixed-pitch这个包吗?我用的doom,加上以后确实可以和org-babel代码块用不同字体了,但是普通文本部分的字体大小不能修改。然后去看了这个包的代码,发现一个变量mixed-pitch-set-height
默认是nil。改成t以后,没想到普通文本部分变回fixed-pitch字体了。谁能帮忙看看这个是怎么回事,怎样才能让文本部分在使用variable-pitch字体的同时又能改大小?
162-166行
(setq mixed-pitch-variable-cookie
(if mixed-pitch-set-height
(face-remap-add-relative
'default :family var-pitch :height var-height :weight var-weight)
(face-remap-add-relative 'default :family var-pitch :weight var-weight)))
我的doom设置:
(setq doom-font "YaHei Monaco Hybird-12"
doom-variable-pitch-font "Helvetica Neue-12")
)
(add-hook! org-mode :append
#'visual-line-mode
#'+org-pretty-mode ;; Display UTF-8 symbols instead of plain text. Set org-hide-emphasis-markers t.
#'variable-pitch-mode
#'mixed-pitch-mode) ;; Allow mixed fonts in a buffer, particularly useful for mixing source code and prose blocks in the same document.
(after! org
(setq mixed-pitch-variable-pitch-cursor nil)
(setq mixed-pitch-set-height t))