emacs-devel
[Top][All Lists]
Advanced

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

Re: ucs-normalize and diacritics


From: Robert Pluim
Subject: Re: ucs-normalize and diacritics
Date: Wed, 25 Jul 2018 22:11:47 +0200

Eli Zaretskii <address@hidden> writes:

>> Date: Wed, 25 Jul 2018 05:36:52 +0300
>> From: Eli Zaretskii <address@hidden>
>> Cc: address@hidden
>> 
>> > Would it be worth allowing emacs to change the font of the
>> > preceding character to match the diacritic and (re-)attempt
>> > composition?
>> 
>> Theoretically, yes.  But it could mean a serious surgery in how
>> character composition is integrated into the display engine, and there
>> are also usability and UI aspects that need to be considered, because
>> the user might have good reasons to use the font she uses for the base
>> character.
>
> I've looked at the related code, and it least the first part doesn't
> seem to be too hard: it just needs expanding some APIs.  The relevant
> function is autocmp_chars, called from composition_reseat_it, which is
> called by the CHAR_COMPOSED_P macro.  The only problem to solve is how
> to determine what font to use if the composition includes more than 2
> characters, and Emacs selects more than 2 fonts to display them (e.g.,
> 3-character composition, each character needs a different font).

How common is 3-character composition likely to be? (for that matter,
how common is 2-character composition?  I explicitly use input methods
for this kind of stuff). I can envisage an algorithm that takes a
combining character, then scans backwards to see if the font used for
it will cover all previous characters, recursively. It does seem like
a lot of effort for a small return.

In any case, based on my quick testing with gedit, weʼre no better or
worse than it is, it also does not compose if the font of the base
character doesnʼt cover the combining character.

Robert



reply via email to

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