Function: hycontrol-global-text-scale-adjust

hycontrol-global-text-scale-adjust is an interactive and byte-compiled function defined in hycontrol.el.

Signature

(hycontrol-global-text-scale-adjust INCREMENT)

Documentation

Change (a.k.a. "adjust") the font size of all faces by INCREMENT.

Interactively, INCREMENT is the prefix numeric argument, and defaults to 1. Positive values of INCREMENT increase the font size, negative values decrease it. A value of 0 reset the font size.

Buffer-local face adjustments have higher priority than global face adjustments.

The variable global-text-scale-adjust-resizes-frames controls whether the frames are resized to keep the same number of lines and characters per line when the font size is adjusted.

See also the related command text-scale-adjust. Unlike that command, which scales the font size with a factor, global-text-scale-adjust scales the font size with an increment.

This is a modification of global-text-scale-adjust. The key handling and definition of a transient keymap is removed so it can be called from the hycontrol menu.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hycontrol.el
(defun hycontrol-global-text-scale-adjust (increment)
  "Change (a.k.a. \"adjust\") the font size of all faces by INCREMENT.

Interactively, INCREMENT is the prefix numeric argument, and defaults
to 1.  Positive values of INCREMENT increase the font size, negative
values decrease it.  A value of 0 reset the font size.

Buffer-local face adjustments have higher priority than global
face adjustments.

The variable `global-text-scale-adjust-resizes-frames' controls
whether the frames are resized to keep the same number of lines
and characters per line when the font size is adjusted.

See also the related command `text-scale-adjust'.  Unlike that
command, which scales the font size with a factor,
`global-text-scale-adjust' scales the font size with an
increment.

This is a modification of `global-text-scale-adjust'.  The key handling
and definition of a transient keymap is removed so it can be called from
the hycontrol menu."
  (interactive "p")
  (when (display-graphic-p)
    (unless global-text-scale-adjust--default-height
      (setq global-text-scale-adjust--default-height
            (face-attribute 'default :height)))
    (let* ((cur (face-attribute 'default :height))
           (inc
            (if (zerop increment)
                (- global-text-scale-adjust--default-height cur)
              (* increment global-text-scale-adjust--increment-factor)))
           (new (+ cur inc)))
      (when (< (car global-text-scale-adjust-limits)
               new
               (cdr global-text-scale-adjust-limits))
        (let ((frame-inhibit-implied-resize
               (not global-text-scale-adjust-resizes-frames)))
          (set-face-attribute 'default nil :height new)
          (redisplay 'force)
          (when (and (not (zerop increment))
                     (= cur (face-attribute 'default :height)))
            (setq global-text-scale-adjust--increment-factor
                  (1+ global-text-scale-adjust--increment-factor))
            (hycontrol-global-text-scale-adjust increment)))))))