43

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?

linuxfreebird
  • 799
  • 2
  • 8
  • 16

4 Answers4

35

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.

SpaceNuB1
  • 748
  • 7
  • 5
32

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.

Seth
  • 10,198
  • 10
  • 45
  • 68
khebbie
  • 2,490
  • 3
  • 31
  • 53
  • 11
    Note: Reloading the config file won't adjust the font size. Emacs has to be restarted. – steel Aug 24 '16 at 16:40
  • 5
    Note that this section is already in `.spacemacs` by default. The link to the doc is http://spacemacs.org/doc/DOCUMENTATION.html#font and has many more details one can tweak – Fred Schoen Apr 20 '17 at 20:58
6

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
Yixing Liu
  • 2,179
  • 1
  • 20
  • 36
0

Another way I do it (at least in Ubuntu 20.04) is to click CTRL and move the scroll wheel on your mouse or touchpad to increase/decrease the size of the text.

moisessalum
  • 7
  • 1
  • 1