在当前shell下运行emacs 出现 fontset 'tty' does not exist.

在终端下执行以下命令进入,shell模式的 emacs,出现如下错误

$ emacs -nw

error: Fontset `tty' does not exist

 

解决办法:

修改.emacs 中关于字体的设置。

(defun s-font()

  (interactive)

  ;; font config for org table showing.

  (set-default-font "monospace-11")

  (dolist (charset '(kana han symbol cjk-misc bopomofo))

    (set-fontset-font (frame-parameter nil 'font)

                      charset

                      (font-spec :family "WenQuanYi Micro Hei")))

  ;; tune rescale so that Chinese character width = 2 * English character width

  (setq face-font-rescale-alist '(("monospace" . 1.0) ("WenQuanYi" . 1.23))))



(add-to-list 'after-make-frame-functions

             (lambda (new-frame)

               (select-frame new-frame)

               (if window-system

                   (s-font))))

(if window-system

    (s-font))

 

你可能感兴趣的:(shell)