Subject: bug#70894: [PATCH] * lisp/window.el (fit-window-to-buffer): Fix width calculation

From: martin rudalics <[email-masked]>
Date: Sun, 19 May 2024 11:22:36 +0200

> For the last issue: we should use default-font-width/height.  But the
 > question is: would replacing frame-char-width/height by these two fix
 > that use case, or do we need anything else?

It might improve those use cases but won't take care of any extra line
spacing.  But there are too many unresolved issues there: How would we
interpret the MAX/MIN-WIDTH and MAX/MIN-HEIGHT arguments - still in
frame character units as we (partially) do now?  Note that functions
like 'window-min-size' or 'window-safe-min-pixel-height' don't care
about window character units, they operate in frame units.  And there's
always the possibility that intermediate rounding errors sum up and make
things only get worse.

martin