在当前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))

 

posted @ 2015-04-28 21:36  阿青1987  阅读(1826)  评论(0编辑  收藏  举报