GNU bug report logs -
#33232
`gnus-summary-line-format' padding doesn’t work in gui when there are multiple-column-width characters
Previous Next
Reported by: "Garreau\, Alexandre" <galex-713 <at> galex-713.eu>
Date: Thu, 1 Nov 2018 21:59:02 UTC
Severity: minor
Tags: wontfix
Merged with 19872
Found in versions 24.4, 5.13, 5.130014
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
>> Date: Thu, 01 Nov 2018 16:52:32 -0700
>> Cc: 33232 <at> debbugs.gnu.org
>>
>> >>> Given this (rectangular) excerpt from my bug-gnu-emacs summary:
>> >>>> …01-nov…[-> 33224 <at> debbugs.gnu.org ] bug#33224: `message-simpli…
>> >>>> …01-nov…[Noam Postavsky ] bug#33225: [debbugs.el] Do…
>> >>>> …01-nov…[-> Noam Postavsky ] bug#33225: [debbugs.el] D…
>> >>>> …01-nov…[積丹尼 Dan Jacobson ] bug#33226: chromium, firef…
>> >>>
>> >>> On my system (Debian, with Xorg, i3, GUI Emacs), the last line has its
>> >>> “]” sooner than the others. This is because `gnus-correct-length'
>> >>> (along with `char-width') says each of the first three characters is
>> >>> two-columns wide: but under GUI, this is untrue, as these three
>> >>> collectively form exactely 5 columns (and not six, as would calculate
>> >>> `gnus-correct-length').
>> >>
>> >> Someone just reported something similar on the org list, that
>> >> `string-width' doesn't return the actual width occupied by the string,
>> >> which you'd think would be the whole point.
>> >
>> > See Bug#31588, the width of these characters depends on the font, so
>> > string-width (which works only on a string) can't give the right answer.
>> > Or, from another point of view, it's the font's fault for being too
>> > narrow on these characters.
>>
>> Yeah, I figured it was probably a font issue, but still it's kind of
>> misleading to have a function that *sounds* like it's going to handle
>> the font issue, but doesn't.
>
> The only reliable way of getting pixelwise alignment in GUI frames is
> to use the :align-to display spec, or other related display property
> specs that provide pixelwise width and alignment.
Interesting, maybe that's something that Org tables should be using.
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
>> Date: Thu, 01 Nov 2018 16:52:32 -0700
>> Cc: 33232 <at> debbugs.gnu.org
>>
>> > See Bug#31588, the width of these characters depends on the font, so
>> > string-width (which works only on a string) can't give the right answer.
>> > Or, from another point of view, it's the font's fault for being too
>> > narrow on these characters.
>>
>> Yeah, I figured it was probably a font issue, but still it's kind of
>> misleading to have a function that *sounds* like it's going to handle
>> the font issue, but doesn't.
>
> What part of "string-width" tells you that it handles fonts?
No, I know that wasn't a reasonable expectation, but I think it's an
easy mistake to make.
This bug report was last modified 5 years and 329 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.