3 ms·
Try this: (defun set-font (font-family height) (interactive "sFont family: \nnHeight: ") (set-face-attribute 'default nil :family font-family :
by gcv 13y ago
Try this:
(defun set-font (font-family height)
(interactive "sFont family: \nnHeight: ")
(set-face-attribute 'default nil :family font-family :height height)
(set-fontset-font "fontset-default" 'unicode font-family))
Then, if you have the right font installed, the following will work:
(set-font "Monaco" 140) ; for 14-pt Monaco
or, e.g.,
(set-font "Anonymous" 120) ; for 12-pt Anonymous
(M-x set-font also works.)