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: Ship Mints <shipmints <at> gmail.com>
To: 78621 <at> debbugs.gnu.org
Subject: bug#78621: Pixelwise display specified spaces less precise than min-width
Date: Wed, 28 May 2025 15:44:38 -0400
[Message part 1 (text/plain, inline)]
This came up as I've been working on improving vtable to operate well in
text-scaled buffers and getting things to align on pixel boundaries is
impacted by this rendering issue.

You can see this in text-scaled buffers when attempting to pad a string to
a specific pixel boundary.  If a pixelwise specified-width space is
inserted after a string with variable-pitch glyphs, it doesn't honor the
net pixel width.  That same string padded using min-width with the same
number of pixels works fine.

I've attached a -Q reproducer which I've run on 30.1 and a recent master
with the same results on macOS.  On master, I run as "src/emacs -Q -l
repro-variable-pitch-pixels.el".

The reproducer shows that a variable-pitch string padded to a specific
pixel width using string+specified space is unreliable vs. string with a
min-width display property.  Fixed-pitch glyphs seem fine and everything
works at scale 0.  There are three buffers created: scale 0, scale -1,
scale +1.

I tried to find where in xdisp.c or in ns*.m this would manifest, but it
wasn't immediately obvious.  I don't have access to another platform this
week, so I do not know if this is NS specific or also manifests with other
toolkits.

-Stephane
[Message part 2 (text/html, inline)]
[repro-variable-pitch-pixels.el (application/octet-stream, attachment)]

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.