【问题标题】:Emacs: how to specify where the true-type font is?Emacs:如何指定真字体在哪里?
【发布时间】:2011-11-08 15:05:17
【问题描述】:

我想在集群上的 emacs 中使用 DejaVu 字体——但我无权在系统范围内安装字体。我将字体(它们是免费的)放在~/.fonts 中。我想使用DejaVuSansMono.ttf。通常我只输入 .emacs:

(custom-set-variables 
 '(default ((t (:inherit nil :stipple nil :background "#ffffb1" :foreground "#141312" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 173 :width normal :foundry "monotype" :family "DejaVu Sans Mono")))))

但是现在emacs找不到字体了!

所以我的问题是 - 我怎样才能帮助 emacs 找到字体?如何指定字体的路径?

【问题讨论】:

  • 你的窗口系统能找到字体吗?
  • @jtahlborn:我很抱歉 - 但我该如何检查呢?
  • 你能打开系统中的其他窗口应用程序并使用该字体吗?如果没有,那么字体可能没有正确安装。
  • 我在服务器上启动了一个 firefox - 并且在首选项中 - 我可以看到 firefox 知道 dejavu 字体。但我不知道——它们是我的——或者整个系统。实际上,我不认为将字体单独放在~/.fonts 文件夹中就等于安装。但我认为可以为 emacs 提供一种搜索 true type 字体的方法。

标签: emacs fonts


【解决方案1】:

看起来bdf-directory-list 会修复它。

(setq bdf-directory-list '("/path/to/fonts"))

我现在无法尝试 - 稍后会回来。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-03-06
    • 1970-01-01
    • 1970-01-01
    • 2012-07-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多