(defun i/set-frame-font (&optional font size)
"Set the FONT and SIZE for the current frame.
If C-u is given, change the font for all frames."
(interactive (list
(completing-read
"font: " (process-lines "fc-list" "--format=%{family[0]}\n"))
(completing-read
"size: " (mapcar (lambda (n) (format "%d" n)) (number-sequence 9 24 1)))))
(set-frame-font (concat font " " size)
nil
(pcase current-prefix-arg
(`nil nil) ; default: modify current frame only
(`(4) t)) ; C-u : all frames
))
I use this function as an alternative to `M-x menu-set-font`. It has an external dependency on fc-list, so it'll probably only work for the Linux and *BSD guys here. I was looking through a thread about fonts, and it came to mind.
>>107240339