[NTG-context] modifying kerning breaks opentype ligatures (and other features)

Rik Kabel context at rik.users.panix.com
Wed Dec 12 01:00:41 CET 2018


On 12/11/2018 15:54, Rik Kabel wrote:
> On 12/11/2018 07:06, Hans Hagen wrote:
>> On 12/11/2018 11:34 AM, mf wrote:
>>>
>>>> But i should consider all the text parts with a modified kerning 
>>>> and disable kerning around character sequences like "ff", "ffi", 
>>>> "fl" and so on. Luckily, the XHTML markup "knows" where the kerning 
>>>> is modified:
>>>>
>>>> <p class="wide">A paragraph with a modified kerning</p>
>>>>
>>>> should become
>>>>
>>>> <p class="wide">A paragraph with a modi<dk>fi</dk>ed kerning</p>
>>>>
>>>> Where <dk>...</dk> (dk=Disable Kerning) are tags to be inserted 
>>>> automatically before feeding the XHTML into ConTeXt.
>>>> I'm not very happy or proud about it, but it can be done.
>>>> Do you think it can be better done inside ConTeXt?
>>>>
>>> I nearly managed to do it in ConTeXt, but I can't create the "<dk>" 
>>> elements right (the "new_dk_element" function is wrong):
>>
>> did you play with
>>
>> \definefontfeature[whatever][keepligatures=auto]
>>
>> \definecharacterkerning [extrakerning] [factor=0.125,features=whatever]
>>
>> \starttext
>>     \setcharacterkerning[extrakerning]
>>     effe fietsen
>> \stoptext
>
> Nice! It recognizes the difference between ccmp and liga, so now we 
> have (almost perfect) support for Sperrdruck! There is a ZWNJ in the 
> following example (between t and z inZeitzone) that gets expanded, 
> leaving an enlarged gap.
>
>
And I spoke too soon (not unusual, I know). The ſi ligature is not 
broken up, but it should be. Only ck, ct, ch, and ſt and tz should be 
preserved.

So it looks like manual intervention is still required. (There are a few 
LaTeX packages that handle this well, chief among the microtype.)

-- 
Rik



More information about the ntg-context mailing list