Emacs中文字体显示不一致。

在切换了linux系统后安装完字体后,用emacs打开org-agenda和minibuffer中选择文件的时候,遇到了中文字体显示不一致的原因。

请问,这是什么由于原因造成的?该如何修改呢?

我的字体配置如下:

(with-eval-after-load 'org
  (defun org-buffer-face-mode-variable ()
    (interactive)
    (make-face 'width-font-face)
    (set-face-attribute 'width-font-face nil :font "Sarasa Mono SC Nerd 15")
    (setq buffer-face-mode-face 'width-font-face)
    (buffer-face-mode))

  (add-hook 'org-mode-hook 'org-buffer-face-mode-variable))

(set-frame-font "ubuntu Mono 14")

你只设置了org-mode相关的buffer-face,一进入org-capture-mode自然就又回到你的全局设置了

额,不知道咋说了我,嘿嘿,贴一下我自己的配置:你自己修改下吧:

(defun anne-set-set-font (frame)
  "Nasy set font for `FRAME'."
  (when (display-graphic-p)
    (set-face-attribute
     'default nil
     :font (font-spec :name   "Iosevka Fixed SS04"
                      :weight 'normal
                      :size   10.5))

    (dolist (charset '(kana han cjk-misc bopomofo))
      (set-fontset-font (frame-parameter nil 'font)
                        charset
                        (font-spec :name   "更纱黑体 SC"
                                   :weight 'normal
                                   :size   10.5)
                        frame
                        'prepend))
    (if *is-win*
        ;; For NS/Cocoa
        (set-fontset-font t
                          'symbol
                          (font-spec :family "Iosevka Fixed SS04"
                                     :weight 'normal)
                          frame
                          'prepend)
      ;; For Linux
      (set-fontset-font t
                        'symbol
                        (font-spec :family "Iosevka Fixed SS04"
                                   :weight 'normal)
                        frame
                        'prepend))
    (set-face-attribute 'mode-line nil
                        :font (font-spec :name   "Iosevka Fixed SS04"
                                         :weight 'normal
                                         :size   10.5)
                        ;; :background "#2d334a"
                        )
    (set-face-attribute 'mode-line-inactive nil
                        :font (font-spec :name   "Iosevka Fixed SS04"
                                         :weight 'normal
                                         :size   10.5))
    (set-face-attribute 'tab-line nil
                        :font (font-spec :name   "Iosevka Fixed SS04"
                                         :weight 'normal
                                         :size   10.5))))
(defun anne-set-font (&rest _)
  (interactive)
  (anne-set-set-font nil))
(add-hook #'after-init-hook #'anne-set-font)
(add-hook #'after-make-frame-functions   #'anne-set-font)
(add-hook #'server-after-make-frame-hook #'anne-set-font)