Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

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.

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.

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. Is it even possible to alter the minibuffer face separately from the default emacs?

An interesting option is the oneonone emacs http://www.emacswiki.org/emacs/OneOnOneEmacs project. 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...

Any help and/or creative ideas would be greatly appreciated.

like image 895
Steve Avatar asked Oct 23 '11 21:10

Steve


2 Answers

You can add customization to the minibuffer through the minibuffer-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. The above doubles the height of the default face.

like image 77
Trey Jackson Avatar answered Sep 25 '22 12:09

Trey Jackson


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. (Or you can customize the standard option minibuffer-frame-alist -- its frame parameter values are used as defaults by 1on1-minibuffer-frame-alist.)

The font frame parameter is the one that controls the font (duh). So you would customize option 1on1-minibuffer-frame-alist, changing its setting for the font.

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. 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.

like image 45
Drew Avatar answered Sep 22 '22 12:09

Drew