Weekly Emacs tip #24 — Resizing the display font in Emacs
Something that may come up when sharing your Emacs screen in a video call: how to increase or decrease the font size? This turns out to be quite easy with the mouse scroll wheel:
C-scrollwill resize the font of the current bufferC-M-scrollwill resize the font for all buffers.
If you don’t like to use the mouse, you can use:
C-x C-=orC-x C-+: increase the buffer font sizeC-x C--: decrease the buffer font sizeC-x C-0: reset the buffer font to the default size
Note that after pressing the initial key combo, a message in the modeline will tell you: Use +, =, -, 0, C-+, C-=, C--, C-0 for further adjustment, so no additional C-x is needed (until you hit a key not listed there). The function that gets called for each of these key combos is text-scale-adjust, which adjusts itself to do what you meant depending on the last part (the +, -, or 0).
To change the font size for all buffers using the keyboard, use:
C-x C-M-=to increaseC-x C-M--to decreaseC-x C-M-0to reset to the default.
Here to, you’ll see a similar message informing you that you don’t need to repeat the C-x: Use +, =, -, 0, ESC for further adjustment. These keys call the function global-text-scale-adjust.
Thanks to this reddit thread for reminding me of these keys.
No Comments