微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何在Ubuntu中的.emacs.el中设置一个默认字体(Inconsolata)?

我尝试遵循从Google搜索收集的建议,但我无法使其工作.我的〜/ .emacs.el文件包含以下内容
;; Set color scheme
(require 'color-theme)
(load-file "/home/manoj/DropBox/conf/themes/color-theme-chocolate-rain.el")
(color-theme-chocolate-rain)

;; Set font
;; (set-default-font "-unkNown-Inconsolata-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1")

;; Insert four spaces on tab
(setq-default indent-tabs-mode nil)
(setq-default tab-width 4)
(setq indent-line-function 'insert-tab)

我已经评论了字体配置行,因为它不起作用.我在Ubuntu Karmic上使用Debian修改的2009-09-27 GNU Emacs 23.1.50.1(i486-pc-linux-gnu,GTK版本2.18.0).

从emacs版本来看,您似乎已经安装了emacs-snapshot(很好).

所以这应该工作:

sudo apt-get install ttf-inconsolata

然后放入你的〜/ .emacs文件

(set-default-font "Inconsolata-12")

(12指字体大小,可以更改.)

原文地址:https://www.jb51.cc/ubuntu/348980.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐