On Thu, Dec 01 2016, John Kitchin wrote:
I use:

;;;###autoload
(defun tq-increase-text-size ()
  "Increase text size."
  (interactive)
  (set-face-attribute 'default nil :height
     (truncate (* 1.1 (face-attribute 'default :height)))))

;;;###autoload
(defun tq-decrease-text-size ()
  "Decrease text size."
  (interactive)
  (set-face-attribute 'default nil :height
     (truncate (* 0.9 (face-attribute 'default :height)))))

which I bind to C-- and C-= to shrink the font size down until it fits,
then when I am done increase it.

Why not use `text-scale-adjust`? This function has convenient bindings in the form `C-x C-+` to increase text size, `C-x C--` to decrease, and `C-x C-0` to reset to default size. Furthermore, once you press any of these, you can simply use `+`, `-` and `0` for increasing, decreasing and resetting until you've found your preferred text size.

--
Joost Kremers
Life has its moments

Reply via email to