我正在运行bashforwindows,并且按照Luke Lee提供的来自源代码的安装说明,本地安装了emacs(不是 emacs for windows):How to use X Windows with Emacs on Windows 10 Bash?
我可以使用MobaXTerm作为xserver从bash运行emacs。但是,我无法让emacs看到我的任何linux字体(或者Windows字体)。
从我的shell中,我可以运行fc-list
并获取一个包含consola和Inconsolata(这就是我想要的)的列表:
[~]$ fc-list
/usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf: DejaVu Serif:style=Bold
/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf: DejaVu Sans Mono:style=Book
/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf: DejaVu Sans:style=Book
/home/hal/.local/share/fonts/consolaz.ttf: Consolas:style=Bold Italic
/home/hal/.local/share/fonts/Inconsolata-Bold.ttf: Inconsolata:style=Bold
/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf: DejaVu Sans:style=Bold
/home/hal/.local/share/fonts/consolai.ttf: Consolas:style=Italic
/usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf: DejaVu Sans Mono:style=Bold
/home/hal/.local/share/fonts/Inconsolata-Regular.ttf: Inconsolata:style=Regular
/home/hal/.local/share/fonts/consolab.ttf: Consolas:style=Bold
/home/hal/.local/share/fonts/consola.ttf: Consolas:style=Regular
/usr/share/fonts/truetype/inconsolata/Inconsolata.otf: Inconsolata:style=Medium
/usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf: DejaVu Serif:style=Book
但是,emacs看不到这些。如果我从该shell运行emacs,然后从emacs运行(print (font-family-list))
,我得到:
("courier" "helvetica" "new century schoolbook" "times" "utopia"
"lucida" "lucidabright" "lucidatypewriter" "fixed" "nil" "clearlyu
alternate glyphs" "clearlyu arabic extra" "clearlyu arabic" "clearlyu
devanagari" "clearlyu devangari extra" "clearlyu ligature" "clearlyu
pua" "clean" "fixed" "open look cursor" "open look glyph" "courier"
"helvetica" "new century schoolbook" "times" "utopia" "lucida"
"lucidabright" "lucidatypewriter" "fixed" "nil" "clearlyu alternate
glyphs" "clearlyu arabic extra" "clearlyu arabic" "clearlyu
devanagari" "clearlyu devangari extra" "clearlyu ligature" "clearlyu
pua" "clean" "fixed" "open look cursor" "open look glyph" "fixed")
不包含我想要的任何字体。
如何让emacs查看可用的字体,或以其他方式找到安装它们的其他方法?
答案 0 :(得分:0)
获取一个使用fontconfig支持编译的emacs版本,而不是仅使用(丑陋的,已弃用的)X核心字体子系统
的版本