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

Rik Kabel context at rik.users.panix.com
Tue Dec 11 21:54:29 CET 2018

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.

    \mainlanguage  [deo]
    \definefont [FrakXIX] [UnifrakturMaguntia19.ttf*frak]
    \definecharacterkerning [extrakerning] [factor=0.25,features=whatever]
    \define\Test{{\FrakXIX ſitzen/beſchütze/Zeit‌zone}}





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20181211/a094707b/attachment.html>

More information about the ntg-context mailing list