Cocoa Emacs 24.5字体问题字体名称无效(Inconsolata-dz)

时间:2015-09-23 16:35:28

标签: macos emacs fonts emacs24

我正在尝试将[Inconsolata-dz] [1]设置为Emacs的默认字体。常规Inconsolata工作正常,但dz版本无法正常工作。我使用的大多数函数都会抛出此错误(按照所有在线说明如何设置Emacs字体的说明):

set-face-attribute: Invalid font name: "-*-Inconsolata-dz-normal-normal-normal-*-13-*-*-*-m-0-iso10646-1"

我终于通过init.el

这样做了
(setq initial-frame-alist '((font . "Inconsolata-dz-13")))
(setq default-frame-alist '((font . "Inconsolata-dz-13")))

我在init.el中也有这个,它由customize-faces生成,但它似乎将字体更改为Helvetica(除非被上面的代码覆盖):

(custom-set-variables
 ;; custom-set-variables 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.
 '(custom-safe-themes
   (quote
    ("e16a771a13a202ee6e276d06098bc77f008b73bbac4d526f160faa2d76c1dd0e"
     "d677ef584c6dfc0697901a44b885cc18e206f05114c8a3b7fde674fce6180879"
     "8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4"
     default))))

(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 (:inherit nil :stipple nil :inverse-video nil
             :box nil :strike-through nil :overline nil
             :underline nil :slant normal
             :weight normal :height 140 :width normal
             :foundry "nil" :family "Inconsolata-dz")))))

现在上面第一个代码的问题是,执行Ctrl+N,创建一个新窗口会抛出相同的无效字体名称错误。

我在Mac上以相同的方式安装了Inconsolata和Inconsolata-dz。只是在OS X上安装字体的常规默认方式。

有谁知道我做错了什么以及如何正确使用Inconsolata-dz?

1 个答案:

答案 0 :(得分:3)

最新版本的emacs似乎在字体名称中出现破折号问题。

此解决方案为我解决了这个问题:

https://emacs.stackexchange.com/questions/16818/cocoa-emacs-24-5-font-issues-inconsolata-dz/29397#29397

基本上必须将字体重命名为InconsolataDZ。