emacs-devel
[Top][All Lists]
Advanced

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

Re: ucs-normalize and diacritics


From: Cesar Crusius
Subject: Re: ucs-normalize and diacritics
Date: Wed, 25 Jul 2018 13:21:54 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Robert Pluim <address@hidden> writes:

> Eli Zaretskii <address@hidden> writes:
>
>>> > 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.

Recalling a recent discussion, they are unavoidable in polytonic Greek, because 
Unicode does not provide the pre-combined character. There's no other way to 
get an "rough breathing long alpha with acute accent," ᾱ̔́. (Which by the way 
Emacs handles nicely with the font I use, Iosevka.)

Granted, not many people will use this, but for those who do, they will be all 
over the place.

-- 
Cesar Crusius

Attachment: signature.asc
Description: PGP signature


reply via email to

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