How easily change font size in spacemacs?

26,702

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
Share:
26,702
linuxfreebird
Author by

linuxfreebird

Updated on December 01, 2020

Comments

  • linuxfreebird
    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
    steel almost 8 years
    Note: Reloading the config file won't adjust the font size. Emacs has to be restarted.
  • Fred Schoen
    Fred Schoen about 7 years
    Note 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
    Ben S almost 6 years
    Note that this doesn't change the font size globally; it just changes it for whichever buffer you're in.
  • Entalpi
    Entalpi over 5 years
    Is it possible to change the text size globally?
  • MKesper
    MKesper about 5 years
    This effects only the present buffer.
  • ngmir
    ngmir about 4 years
    By the way, you can customize the step size via the variable text-scale-mode-step.
  • philipper
    philipper about 4 years
    @Entalpi yes with M-x menu-set-font under emacs or <Space> <Space> menu-set-font under spacemacs