Currently for me "text-scale-increase" and "C-X X-+" increase the font size by very high number- so it is either super big, or super tiny. How do I make it to increase it by 1?
2 Answers
You can find the help for text-scale-increase
with the key combo C-h f text-scale-increase <RET>
. This will show you the following:
Each step scales the height of the default face by the variable
‘text-scale-mode-step’
(a negative number of steps decreases the height by the same amount). As a special case, an argument of 0 will remove any scaling currently active.
So you can modify the size of the steps by customizing text-scale-mode-step
, via M-x customize-variable text-scale-mode-step <RET>
. The default value is 1.2, so anything smaller (e.g., 1.1) will result in smaller increments.
Note that this is a multiplication factor, not a discrete font size difference. That is, you are increasing your font by 1.2 times, not by 2 point sizes. Since fonts come in discrete sizes, small changes in text-mode-scale-step
may cause the same actual change. For my system, only the first decimal place is useful -- 1.05 and 1.06 produce identical increments.
To supplement what @Tyler said, there is also variable, but not option, text-scale-mode-amount
.
C-h f text-scale-mode
:
text-scale-mode
is an interactive compiled Lisp function inface-remap.el
.
(text-scale-mode &optional ARG)
Minor mode for displaying buffer text in a larger/smaller font.
With a prefix argument
ARG
, enable the mode ifARG
is positive, and disable it otherwise. If called from Lisp, enable the mode ifARG
is omitted ornil
.The amount of scaling is determined by the variable
text-scale-mode-amount
: one step scales the global default face size by the value of the variabletext-scale-mode-step
(a negative amount shrinks the text).The
text-scale-increase
,text-scale-decrease
, andtext-scale-set
functions may be used to interactively modify the variabletext-scale-mode-amount
(they also enable or disabletext-scale-mode
as necessary).
As the doc says, you can modify variable text-scale-mode-amount
interactively. It is not a user option.