emacs-devel
[Top][All Lists]
Advanced

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

Re: on helm substantial differences


From: Juri Linkov
Subject: Re: on helm substantial differences
Date: Wed, 25 Nov 2020 11:10:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>> > There is: font-get-glyphs.  But I'd recommend to just use a TAB of a
>> > suitable width instead of dealing with the complexity that
>> > font-get-glyphs requires.
>>
>> I can't find a suitable width for TAB: 5 makes a too wide gap between
>> a character and its name, and with 4 some characters are misaligned.
>
> Then I think we should just use 5.

tab-width=5 doesn't help to align characters in the second column
when completions are displayed in two columns.

To align the second column, 'completion--insert-strings'
inserts " \t" with `(display (space :align-to ,column)).

So when completions use \t to separate a character from its name,
then the two-column layout schematically looks like this:

character1 \t name1   \t with :align-to   character2 \t name2

And tab-width doesn't align properly \t between character2 and name2.

>> But despite the complexity of font-get-glyphs, is it reasonably fast?
>
> I cannot answer that, you will have to try and see.  Whether the speed
> is reasonable depends on what the rest of the application does.

It seems font-get-glyphs can't be used because on wide characters it
returns nil:

(font-get-glyphs (font-at (point)) 0 1 "𒐫")
=> [nil]



reply via email to

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