[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unicode combining characters
From: |
Eli Zaretskii |
Subject: |
Re: Unicode combining characters |
Date: |
Tue, 25 May 2021 22:44:29 +0300 |
> Cc: emacs-devel@gnu.org
> From: Clément Pit-Claudel <cpitclaudel@gmail.com>
> Date: Tue, 25 May 2021 15:30:21 -0400
>
> Based on the screenshot this is an issue with Company. Company displays its
> "pop-ups" by putting a replacing 'display property on the text following the
> point (and on the next few lines). So if the buffer contains
>
> ABC XYZ DEF GHI
> JKL MNO PQR STU
>
> and the point is after XYZ, then company puts a replacing display spec from "
> DEF" to "STU".
> To display completions "XYZ1233" and "XYZ456", the replacing display spec
> contains "123| GHI\nJKL XYZ456| STU", so the final display is
>
> ABC XYZ123| GHI
> JKL XYZ456| STU
>
> The OP's issue is that "123" and "456" don't have the same length. As far as
> I know, there is no way to add extra space after 123 or 456 so that they
> reach the same X coordinate, given that they are already part of a display
> spec.
First, the OP said "overlay", and overlay strings can have display
properties.
And second, I'd expect the current code to use string-width to compute
how much whitespace will be needed after each completion candidate,
and string-width already accounts for composed (a.k.a "combined")
characters. Yes, string-width provides only an approximation for the
true pixel width of the string, but that's not specific to
compositions, and the whole technique is somewhat of a kludge anyway,
for this reason and others.
- Unicode combining characters, Anand Tamariya, 2021/05/25
- Re: Unicode combining characters, Anand Tamariya, 2021/05/26
- Re: Unicode combining characters, Joost Kremers, 2021/05/26
- Re: Unicode combining characters, Eli Zaretskii, 2021/05/26
- Re: Unicode combining characters, Eli Zaretskii, 2021/05/26
- Re: Unicode combining characters, Anand Tamariya, 2021/05/27
- Re: Unicode combining characters, Eli Zaretskii, 2021/05/27
- Re: Unicode combining characters, Basil L. Contovounesios, 2021/05/27
- Re: Unicode combining characters, Eli Zaretskii, 2021/05/27
- Re: Unicode combining characters, Anand Tamariya, 2021/05/27
- Re: Unicode combining characters, Eli Zaretskii, 2021/05/27