On Wed, May 28, 2025 at 6:12 PM Jim Porter <jporterbugs@gmail.com> wrote:
On 5/28/2025 1:40 PM, Ship Mints wrote:
> But... Did you run the repro in question and it worked for you, or are
> you saying that this worked for your case?

I edited your repro to use that call (see the diff below), and it all
looks good to me, as shown in the attached screenshots.

--- before.el   2025-05-28 14:58:33.646686778 -0700
+++ after.el  2025-05-28 14:58:42.551136757 -0700
@@ -12,8 +12,7 @@
      (let ((pad-to-width 150))
        (cl-labels
            ((string-pixel-width-scaled (str)
-             (ceiling (* (string-pixel-width str)
-                         (/ (float (default-font-width))
(frame-char-width)))))
+             (string-pixel-width str (current-buffer)))
             (insert-pad-to-width (str face)
               (let* ((s (propertize str 'face face))
                      (pad-width (- pad-to-width

Interesting.  The results got worse for me, not better.

What platform did you test on?