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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to