Subject: `gnus-summary-line-format' padding doesn’t work in gui when there are multiple-column-width characters

From: "Garreau\, Alexandre" <[email-masked]>
Date: Thu, 01 Nov 2018 22:58:32 +0100

Given this (rectangular) excerpt from my bug-gnu-emacs summary:
> …01-nov…[-> [email-masked]        ] 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').

You can check that by eval’ing:
> (window-text-pixel-size nil (- (point) 593) (- (point) 588))
> (window-text-pixel-size nil (- (point) 583) (- (point) 580))
which return the width of the three first characters after “[” in the
two last summary lines.

According `gnus-correct-length' they’r the same size:
> (gnus-correct-length "[積丹尼 Dan Jacobson             ]")
> (gnus-correct-length "[-> Noam Postavsky               ]")

According `char-width' the fact each character is considered to have a
width which is a multiple of the others makes them the same size:
> (mapcar #'char-width "[積丹尼 Dan Jacobson             ]")
> (mapcar #'char-width "[-> Noam Postavsky               ]")

So would it be better to get gnus-correct-length keep returning a column
number but as a float to be somewhat compatible? or working with pixels
when operating in a GUI frame? but how would padding, which is said to
be in numbers of column, operate then?

or should it stay with a behavior that works in terminal but breaks in
gui?

I’m reporting this at least for archive, in case someone have an idea.
But I’m not sure the solution is that trivial.

Gnus v5.13
GNU Emacs 25.1.1 (i686-pc-linux-gnu, GTK+ Version 3.22.11)
 of 2017-09-15, modified by Debian