kunalb / poet

An emacs theme that's well suited for modes using variable pitch: particularly org-mode and markdown-mode.
MIT License
515 stars 15 forks source link

Text-scale-increase and headings #19

Open trmd opened 4 years ago

trmd commented 4 years ago

Hi, saw that this was mentioned in https://github.com/kunalb/poet/issues/8 already.

Is it possible or will it be possible to use text-scale-increase and get headings to also increase?

kunalb commented 4 years ago

Note to self: I need to figure out a way to derive all heights from 'default but also allow poet to modify it temporarily while it is active.

Broken code for reference later:

(defun poet-theme--height (multiplier)
  "Returns the height as MULTIPLIER * variable-pitch height."
  (let ((multiplier (* poet-theme-variable-pitch-multiplier
                       (if text-scale-mode
                           (expt text-scale-mode-step
                                 text-scale-mode-amount)
                         1))))
    (if poet-theme-variable-headers
        (truncate (* multiplier (* poet-theme-monospace-height multiplier)))
      (truncate (* multiplier poet-theme-monospace-height)))))