Would it be possible that for a particular window width, I can automatically adapt the text to show up to a certain column number? If possible not via face attributes but using text-scale-mode
at buffer-local level.
As example, use ruler-mode and change the window size until you get to column 32. Then call squeeze
with desired column being 75. The result is not a window with extent of 75 characters on the ruler.
(defun squeeze (nc)
(interactive "nDesired number of columns: ")
(let ( (ncwin (window-width)) )
(when (> ncwin 0)
(let* ( (scaling-factor (/ (float nc) ncwin))
(step text-scale-mode-step)
(scale-steps (ceiling (/ scaling-factor step)))
(print 1))
(when (> nc ncwin)
(setq scale-steps (* -1 scale-steps)))
(text-scale-set scale-steps)) )))