Subject: bug#51995: 29.0.50; `string-pixel-width' depends on the current window width

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 22 Nov 2021 12:04:35 +0100

martin rudalics <[email-masked]> writes:

> Yes.  This wasn't a very bright idea.  The function will now be
>
> (defun string-pixel-width (string)
>   "Return the width of STRING in pixels."
>   (with-temp-buffer
>     (insert string)
>     (car (buffer-text-pixel-size nil nil t))))
>
> as you suggested.  The xdisp.c change is attached.  Apply the
> 'string-pixel-width' change manually.

Thanks; I've now applied the patch and adjusted the function, and it
seems to work as advertised now.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no