1

I want to be zoomed in twice at startup. This is the result of the command SPC z f + +. How can I configure this in my .spacemacs?

1 Answers1

4

The command those shortcuts reference is the text-scale-adjust command. This command is designed to increase or decrease text size in a single buffer, relative to the default font size. For example, evaluating:

(text-scale-adjust 2)

would scale the text in the current buffer up by two steps. If you tried putting that in your .init or .spacemacs file, it wouldn't work - as soon as a new buffer is created, it resets to the default font size. You could define a hook that calls text-scale-adjust whenever a new buffer is created, but that isn't the intended solution.

In order to change the font size globally, you should manually set the default font size. To do this, you adjust the height property of the font named default. Add this line to your .spacemacs file:

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

Play around with the value until you find a size you like. Note that this will not refill your windows - the frame expands relative to the text size increase. You may need to re-size the frame afterwards.

You can look at the current height of the default font by calling M-x describe-face RET default RET.

Further information about font sizes (including this discussion) can be found on the Wiki.

JCC
  • 989
  • 5
  • 15