简体   繁体   English

改变Emacs迷你缓冲区的字体大小与默认emacs分开?

[英]Altering the font size for the Emacs minibuffer separately from default emacs?

I've been attempting to alter the font / face for the emacs minibuffer separately from emacs default fonts, but without much luck. 我一直在试图改变emacs迷你缓冲区的字体/面部与emacs默认字体分开,但没有太多运气。

Specifically, I'm interested in making the minibuffer font size larger for use with the emacs MULE as, with my current font setting or if I'm using emacs on a "netbook" screen, sometimes the character selection options in the MULE are a bit small. 具体来说,我有兴趣使用与emacs MULE一起使用的迷你缓冲区字体大小,使用我当前的字体设置,或者如果我在“上网本”屏幕上使用emacs,有时MULE中的字符选择选项是有点小。

Options easily accessed within emacs are the minibuffer-prompt & minibuffer-prompt-properties, but these are only for command prompts and not the regular minibuffer text. 在emacs中可以轻松访问的选项是minibuffer-prompt和minibuffer-prompt-properties,但这些只适用于命令提示而不是常规的迷你缓冲文本。

There seem to be a number of minibuffer variables listed in emacs for creating minibuffer frames, or getting contents from minibuffer windows, etc.. but these do not pertain to altering the minibuffer face. emacs中似乎列出了一些用于创建迷你缓冲帧或从迷你缓冲窗口获取内容等的迷你缓冲变量。但这些变量与改变迷你缓冲区面无关。 Is it even possible to alter the minibuffer face separately from the default emacs? 甚至可以将迷你缓冲区面与默认的emacs分开更改吗?

An interesting option is the oneonone emacs http://www.emacswiki.org/emacs/OneOnOneEmacs project. 一个有趣的选择是oneonone emacs http://www.emacswiki.org/emacs/OneOnOneEmacs项目。 But could the dedicated minibuffer frame be altered? 但是可以改变专用的迷你缓冲框架吗? Also before I alter my current emacs set-up that drastically, I'd hope to be able to just alter fonts first or create my own alterable minibuffer frame, etc... 在我彻底更改当前的emacs设置之前,我希望能够先改变字体或创建我自己的可变迷你缓冲帧等等......

Any help and/or creative ideas would be greatly appreciated. 任何帮助和/或创意都将不胜感激。

You can add customization to the minibuffer through the minibuffer-setup-hook . 您可以通过minibuffer-setup-hookminibuffer-setup-hook添加自定义。 In there, you can do some face remapping like so: 在那里,你可以像这样做一些面部重映射

(add-hook 'minibuffer-setup-hook 'my-minibuffer-setup)
(defun my-minibuffer-setup ()
       (set (make-local-variable 'face-remapping-alist)
          '((default :height 2.0))))

Change the body of the my-minibuffer-setup as desired. 根据需要更改my-minibuffer-setup的主体。 The above doubles the height of the default face. 以上是默认面部高度的两倍。

Yes, you can easily customize the properties of a standalone minibuffer frame, including its default face and font. 是的,您可以轻松自定义独立迷你缓冲框架的属性,包括其默认面和字体。

You can customize the OneOnOneEmacs user option 1on1-minibuffer-frame-alist . 您可以自定义OneOnOneEmacs用户选项1on1-minibuffer-frame-alist minibuffer 1on1-minibuffer-frame-alist (Or you can customize the standard option minibuffer-frame-alist -- its frame parameter values are used as defaults by 1on1-minibuffer-frame-alist .) (或者您可以自定义标准选项minibuffer-frame-alist - 其帧参数值用作默认值1on1-minibuffer-frame-alist 。)

The font frame parameter is the one that controls the font (duh). font框架参数是控制字体(duh)的参数。 So you would customize option 1on1-minibuffer-frame-alist , changing its setting for the font. 因此,您可以自定义选项1on1-minibuffer-frame-alist ,更改其字体设置。

Alternatively, you can just set 1on1-minibuffer-frame-font to the font you want -- it is used as the default value for the font setting by 1on1-minibuffer-frame-alist whenever there is no explicit font setting in minibuffer-frame-alist . 或者,您可以将1on1-minibuffer-frame-font设置为您想要的字体 - 只要在minibuffer-frame-alist没有明确的font设置,它就会被1on1-minibuffer-frame-alist用作字体设置的默认值。 minibuffer-frame-alist For example: 例如:

(setq 1on1-minibuffer-frame-font
          "-*-Lucida Console-normal-r-*-*-14-112-96-96-c-*-iso8859-1")

If you do not want to use a standalone minibuffer frame then see Trey's answer. 如果您不想使用独立的迷你缓冲框架,请参阅Trey的答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM