To always start out with the text size you want:
Zoom a frame to the text size you like (e.g. using command zoom-in/out
from zoom-frm.el
or in some other way)
Use M-: (frame-parameters)
and look for the value of parameter font
. Or use M-: (frame-parameter nil 'font)
and get the value from buffer *Messages*
. This whole string is the font name you want - it includes the size of the font.
M-x customize option default-frame-alist
and add a font
entry with that font-name value. For example, you might add an entry such as this, which specifies font Lucida Console with size 15:
"-outline-Lucida Console-normal-normal-normal-mono-15-*-*-*-c-*-iso8859-1"
- In Customize, save the customization of
default-frame-alist
.
But that only helps if you always want the same default font size. If you want a different default font size depending on what monitor you use, then you need to either save such a setting, for each desired font size, to different files, and load the right file for the given monitor, or automatically detect the monitor characteristics and automatically set the right font.
The overall point is to save the full name of the font you want, and then set that for your default-frame-alist
in your init file for a given session.
There are also other frame alists, besides default-frame-alist
, which you might want to customize, but that's the main one.