GNU bug report logs - #78621
Pixelwise display specified spaces less precise than min-width

Previous Next

Package: emacs;

Reported by: Ship Mints <shipmints <at> gmail.com>

Date: Wed, 28 May 2025 19:46:01 UTC

Severity: normal

Tags: notabug

Done: Ship Mints <shipmints <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jim Porter <jporterbugs <at> gmail.com>
Cc: shipmints <at> gmail.com, 78621 <at> debbugs.gnu.org
Subject: bug#78621: Pixelwise display specified spaces less precise than min-width
Date: Sat, 31 May 2025 09:56:33 +0300
> Date: Fri, 30 May 2025 13:01:30 -0700
> Cc: shipmints <at> gmail.com, 78621 <at> debbugs.gnu.org
> From: Jim Porter <jporterbugs <at> gmail.com>
> 
> On 5/29/2025 9:39 PM, Eli Zaretskii wrote:
> > If the string's text is already in a buffer, we have
> > buffer-text-pixel-size and window-text-pixel-size for that purpose.
> > If the text is not in any buffer, then string-pixel-width should do
> > the job, and do it well.  In particular, it strives to turn on/off all
> > the features that affect display as they are in the original buffer
> > (which can be passed to it as an optional argument), and applies all
> > the buffer-local settings that could matter.  This includes face
> > remapping (which is how text-scaling is implemented).
> > 
> > So I still don't understand the nature of the problem.
> 
> The problem was simply that the original script to reproduce the issue 
> didn't pass the optional buffer argument to 'string-pixel-width', so the 
> relevant buffer-local settings (face remapping) weren't used. Instead, 
> the original script tried to approximate the remapping using its own 
> calculations which weren't quite the same as the display engine.

Thanks, now everything is clear.




This bug report was last modified 50 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.