在Options->Set Default Font中选择“苹方-简”,
M-x describe-font
结果显示:
这样便得到了字体的名称:“PingFang SC”
怎样设置字体在emacs官方文档里面有详细文档。不过确实很复杂,不好理解。简单起见,直接在这个配置基础上修改下字体名称和字号就好:
(require 'cl)(defun my-set-fontset (fontset alst)
"set fontset according to alst.
The alst contains TARGET FONT-SPEC pairs. TARGET should be from
most specific (latin) to most generic (nil). Otherwise, some
lines will have no effect.
see `set-fontset-font' for what could be used for TARGET and FONT-SPEC"
(loop for (target font-spec) in (reverse alst)
do (set-fontset-font fontset target font-spec)))
(my-set-fontset
"fontset-startup"
'((latin "Bitstream Vera Sans Mono-12") 英文字体
(han "宋体-12") 中文字体
(nil "文泉驿等宽正黑-12"))) 其它所有字符默认字体
set fontset-startup as current frame's font.
(set-frame-font "fontset-startup" nil t)
set fontset-startup as default frame font.
(add-to-list 'default-frame-alist '(font . "fontset-startup"))
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)