[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Variable pitch text filling

From: Eli Zaretskii
Subject: Re: Variable pitch text filling
Date: Thu, 02 Dec 2021 11:34:34 +0200

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: emacs-devel@gnu.org
> Date: Thu, 02 Dec 2021 09:56:29 +0100
> Eli Zaretskii <eliz@gnu.org> writes:
> >> But they don't.  They shouldn't be shorter than a normal character here,
> >> because that makes them difficult to click, but they will change size
> >> individually.
> >
> > Putting a min-width property on each of them will achieve that goal,
> > right?
> The goal is not to make the individual characters in U:-- not change
> displayed width.  To do that, you'd have to make each character as wide
> as the widest glyph in the font, and that will be really ugly.

Not the widest glyph in the font, only the widest of the characters
that can be displayed in that place on the mode line.  Which is a
small set, so there's no problem finding the widest one, even
statically and in advance.

> The goal is to make the "-" wide enough that you can click it, which
> is why they should have a char-spacing property of "one normal
> character".

But it is also ugly to have those characters move when we display a
different character in one of those places.  Someone asked to make
sure such a shift doesn't happen, so that users could click on the
same place more than once without moving the mouse, to toggle the
setting back and forth.  If we don't make each of these characters a
separate string with its separate min-width, we cannot make sure such
shifts don't happen.

So I think the solution of making each of these characters a separate
string with a separate min-width, which is "wide enough for our
purposes" is a better solution, which achieves both goals at the same

reply via email to

[Prev in Thread] Current Thread [Next in Thread]