[英]Emacs `Invalid font name`
I am using GNU Emacs 24.3.1 (x86_64-suse-linux-gnu, GTK+ Version 3.6.4). 我使用的是GNU Emacs 24.3.1(x86_64-suse-linux-gnu,GTK + 3.6.4版)。 I have custom font Inconsolata-g in my
~/.fonts
folder, and I have set it as Monospace font in ~/.config/fontconfig/fonts.conf
. 我在
~/.fonts
文件夹中有自定义字体Inconsolata-g,我在~/.config/fontconfig/fonts.conf
中将其设置为Monospace字体。 It works well except Emacs is giving me error: Invalid font name, -unknown-Inconsolata-g-normal-normal-normal-*-15-*-*-*-m-0-iso10646-1
at launch. 它运行良好,除了Emacs给我
error: Invalid font name, -unknown-Inconsolata-g-normal-normal-normal-*-15-*-*-*-m-0-iso10646-1
在发布时。
If I change monospace font, then Emacs launch without problem, but when I do Mx set-default-font
, and select -unknown-Inconsolata-g-normal-normal-normal-*-*-*-*-*-m-0-iso10646-1
, I also get Invalid font name: "-unknown-Inconsolata-g-normal-normal-normal-*-*-*-*-*-m-0-iso10646-1"
. 如果我更改等宽字体,那么Emacs启动没有问题,但是当我做
Mx set-default-font
,并选择-unknown-Inconsolata-g-normal-normal-normal-*-*-*-*-*-m-0-iso10646-1
,我也得到Invalid font name: "-unknown-Inconsolata-g-normal-normal-normal-*-*-*-*-*-m-0-iso10646-1"
。
How could i fix this? 我怎么能解决这个问题?
Thanks to Peter Dyballa ( http://lists.gnu.org/archive/html/help-gnu-emacs/2013-06/msg00347.html ), I fixed this with the following in my ~/.emacs
: 感谢Peter Dyballa( http://lists.gnu.org/archive/html/help-gnu-emacs/2013-06/msg00347.html ),我在
~/.emacs
修改了以下内容:
(setq initial-frame-alist '(
(font . "Monospace-10")
))
(setq default-frame-alist '(
(font . "Monospace-10")
))
(I have set Monospace
to Inconsolata-g
in my system settings) (我在系统设置中将
Monospace
设置为Inconsolata-g
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.