本文介绍了Emacs / OSX默认字体设置不会持续的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Emacs 23.2。当我使用选项 - >设置默认字体更改默认字体时,它正确切换到我选择的字体。然后我选择选项 - >保存选项使其成为永久性。



它将一个节写入我的.emacs的末尾,但它是空的,不包含任何关于字体的内容。此外,在微型缓冲存储器中,它说装载电池完成似乎有点怪异。而当我重新启动Emacs时,字体回到默认状态,即是摩纳哥。类似地,更改字体大小不会持续,但其他(非字体相关的)自定义仍然存在。



任何人看到这个?任何人知道如何使字体设置永久?

解决方案

尝试 Mx自定义面部RET默认值,根据您的喜好调整,然后选择保存以备将来会议。



编辑
例如,这将在.emacs中的(custom-set-faces)中添加以下节:

 code>(定制面值
'(默认((t(:inherit nil:stipple nil:backgroundWhite:foregroundBlack:reverse-video nil:box nil:strike-through nil:overline nil:underline nil:slant normal:weight normal:height 130:width normal:familyConsolas))))
...

如果您想要的是设置字体大小和家庭(在本示例中为13pt Consolas),这似乎就足够了:

 '(default((t(:height 130:familyConsolas))))


I'm using Emacs 23.2. When I change the default font using Options --> Set Default Font... it correctly switches to the font that I select. I then do Options --> Save Options to make it permanent.

It writes a stanza to the end of my .emacs, but it's empty, doesn't contain anything about the font. Also, in the minibuffer it says "Loading battery...done" which seems a bit weird. And when I restart Emacs, the font is back to the default, which is Monaco. Similarly, changing the font size does not persist, but other (non-font-related) customizations do persist.

Anyone seen this? Anyone know how to make the font setting permanent?

解决方案

Try M-x customize-face RET default, adjust to your liking, then 'Save for future sessions'.

Edit:For example, that adds the following stanza to my (custom-set-faces) in .emacs:

(custom-set-faces
  '(default ((t (:inherit nil :stipple nil :background "White" :foreground "Black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 130 :width normal :family "Consolas"))))
  ...

If all you want to so is set the font size & family (13pt Consolas in this example), this appears to be sufficient:

  '(default ((t (:height 130 :family "Consolas"))))

这篇关于Emacs / OSX默认字体设置不会持续的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 02:16