Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bind key to increase / decrease font size in emacs

In my terminal (I have terminator) I can use the key combinations Ctrl + and Ctrl - to increase / decrease the font size.

In emacs I can do the following to set the font-height:

(set-face-attribute 'default nil :height 70) 

But I do not know how to increase / decrease it. How could I easily add this to my emacs configuration?

like image 984
blueFast Avatar asked Dec 23 '12 12:12

blueFast


People also ask

How do I reduce font size in Emacs?

Vanilla Emacs: You can use ` C-x C-+ ' and 'C-x C--' ( 'text-scale-adjust' ) to increase or decrease the buffer text size (` C-+ ' or 'C--' to repeat). To restore the default (global) face height, type 'C-x C-0' .

How do I change font size in Emacs?

You can press C-x C-+ and C-x C-- to increase or decrease the buffer text size.

How do you change the font on Spacemacs?

Another way is to use the key sequence "SPC z x" and then press "+/=" key to increase font size or "-" key to decrease font size. Other options are shown on the which-key menu. This effects only the present buffer. By the way, you can customize the step size via the variable text-scale-mode-step .

What is the default Emacs font?

By default, Emacs displays text on graphical displays using a 10-point monospace font, and the font size can be changed interactively (see Text Scale).


1 Answers

I think you want C-x C-+ or C-x C--.

like image 115
Stefan Avatar answered Sep 28 '22 07:09

Stefan