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

时间:2015-04-28 22:41:26   收藏:0   阅读:1610

在终端下执行以下命令进入,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))

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!