使用emacs有一阵子了,这里面比较方便的一点是可以自己设置字体。如果使用spacemacs,默认的是Souce Code Pro字体,但是我的电脑从来没有安装这个字体,加上这个不会影响到其他的功能暂时就没有去尝试。
今天正好网上看到了这款字体的评论,找了一下其实也很好找,开源的一款字体而且托管在了Github上。
下载了之后,很容易找到了TTF文件。
这里是字体的管理目录,安装比较简单,直接把文件拷贝到这里即可。
之后,可以看到整个字体名称。接下来,在emacs中配置字体。
设置之前的配置:
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:family "Courier New" :foundry "outline" :slant normal :weight normal :height 120 :width normal)))))
效果:
修改如下:
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:family "Source Code Pro" :foundry "outline" :slant normal :weight normal :height 120 :width normal)))))
效果:
嗯,感觉确实还是不错的!