Subject: bug#48307: Feature request: provide default keybindings to change the font size in all windows

From: Clément Pit-Claudel <[email-masked]>
Date: Sun, 9 May 2021 17:36:18 -0400

On 5/9/21 4:16 PM, Gregory Heytings wrote:
>> Not all the implementations are good, and it would be very nice if such a feature were available out of the box.
>>
> 
> Would the following do what you want?
> 
> (defun global-text-scale-adjust-do (increment)
>   (set-face-attribute 'default nil :height
>               (+ (face-attribute 'default :height) increment))
>   (message "Use + and - for further adjustment")
>   (set-transient-map
>    (let ((map (make-sparse-keymap)))
>      (define-key map (kbd "+") 'global-text-scale-adjust-increase)
>      (define-key map (kbd "-") 'global-text-scale-adjust-decrease)
>      map)))
> (defun global-text-scale-adjust-increase ()
>   (interactive)
>   (global-text-scale-adjust-do +5))
> (defun global-text-scale-adjust-decrease ()
>   (interactive)
>   (global-text-scale-adjust-do -5))
> (global-set-key (kbd "C-x M-+") 'global-text-scale-adjust-increase)
> (global-set-key (kbd "C-x M--") 'global-text-scale-adjust-decrease)

Yup, probably.  The performance isn't great, but that's more or less what I have in my .emacs.