更改Aquamacs中的字体?
时间:2020-03-05 18:52:51 来源:igfitidea点击:
我最近需要做一些Lisp编辑,我发现了适用于OS X的漂亮的Ready Lisp软件包,这很棒,除了Aquamacs自动使用比例字体(即惯用字体,恕我直言)而且我想更改它转换为等宽字体。但是,我并不是真正的EMACS用户,Aquamacs中的首选项菜单尚不清楚在何处以及如何进行此更改。
解决方案
回答
从EmacsWiki Aquamacs常见问题解答:
To change the font used to display the current frame, go to the font panel. You can do this with the keystroke Apple-t, or via the menu: Options → Show/Hide → Font Panel. Once there, select the font you want. To make the current frame’s font the default, go to Options → Frame Appearance Styles. Select “use current style for foo mode”, where foo is the mode of the current frame (e.g., foo=text for text mode), to use the current style (including the font, but also any other changes you’ve made to the frame’s style) for all files of this type. Select “use current style as default” to use the current style for all files for whose major mode no special style has been defined.
还建议使用等宽字体摩纳哥或者" Vera Sans Mono"。
回答
这是我在OS X的.emacs中拥有的内容:
(set-default-font "-apple-bitstream vera sans mono-medium-r-normal--0-0-0-0-m-0-mac-roman")
现在,我不确定Bitstream Vera是否在OS X上标配,因此我们可能必须下载它或者选择其他字体。我们可以通过在ELisp缓冲区中运行`(x-list-fonts" searchterm"))来搜索X字体名称(例如,运行* scratch *并在其中键入内容,然后在同一行中键入Cj)。 。
回答
这是我使用的一种:
-apple-DejaVu_Sans_Mono-medium-normal-normal-*-12-*-*-*-m-0-iso10646-1
我们可以在.emacs文件中进行设置,例如:
(set-default-font "-apple-DejaVu_Sans_Mono-medium-normal-normal-*-12-*-*-*-m-0-iso10646-1")
我们可以从dejavu-fonts.org下载它
回答
在Aquamacs 2.1中,我们可以通过"选项"->"外观"->"文本模式字体..."来设置字体。这会弹出标准字体选择器窗口,选择所需的字体。然后,当退出emacs(C-x C-c)时,系统将提示我们保存选项,然后单击" y"。