How easily change font size in spacemacs?
Solution 1
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.
Solution 2
In my .spacemacs file I have the following
(defun dotspacemacs/init ()
(setq-default
dotspacemacs-startup-lists '(recents bookmarks projects)
dotspacemacs-default-font '("SourceCode Pro"
:size 18
:weight normal
:width normal
:powerline-offset 2))
Of course you should change the font to your liking. The powerline has some char that goes well with the powerline in spacemacs.
To get to .spacemacs simply type SPC f e d
to reload the new file type SPC f e R
.
This should do it.
And yes I am an old man with less than optimal eyes, hence the rather large font.
Solution 3
If you don't want to change the default settings or want to change the font size without restarting emacs, try:
M-x text-scale-increase
![linuxfreebird](https://i.stack.imgur.com/V8jnD.jpg?s=256&g=1)
linuxfreebird
Updated on December 01, 2020Comments
-
linuxfreebird over 3 years
How do change the font size in spacemacs? Do I need to download additional packages such as source code font?
I tried changing the font size in the configuration file, but the font size does not change. I am having trouble installing source code font, because the font paths are not registered correctly. The fonts were installed via the instructions provided by open source Adobe. Is there an easier way to do such a simple task in spacemacs?
-
steel almost 8 yearsNote: Reloading the config file won't adjust the font size. Emacs has to be restarted.
-
Fred Schoen about 7 yearsNote that this section is already in
.spacemacs
by default. The link to the doc is spacemacs.org/doc/DOCUMENTATION.html#font and has many more details one can tweak -
Ben S almost 6 yearsNote that this doesn't change the font size globally; it just changes it for whichever buffer you're in.
-
Entalpi over 5 yearsIs it possible to change the text size globally?
-
MKesper about 5 yearsThis effects only the present buffer.
-
ngmir about 4 yearsBy the way, you can customize the step size via the variable
text-scale-mode-step
. -
philipper about 4 years@Entalpi yes with
M-x menu-set-font
under emacs or<Space> <Space> menu-set-font
under spacemacs