On 12/10/2018 4:26 PM, mf wrote:
Hello list,
i noticed that setting a different kerning breaks some features of opentype fonts; that is true, for example, for ligatures and fractions (frac feature).

It looks like a modified kerning inserts something between two adjacent character, making them no more adjacent.
That way the lookup of opentype tables fails.

"f", "l"            => "fl" ligature glyph

"f", [kerning], "l" => distinct "f" and "l" glyphs

"1", "/", "4" => "¼" glyph (with "frac" feature switched on)

"1", [kerning], "/", [kerning], "4" => distinct "1", "/", "4" glyphs (always with "frac" feature switched on)

MWE:

\definecharacterkerning[narrow][factor=-.015]
\definecharacterkerning[wide][factor=.015]

\definefontfeature[frac][frac=yes]

\starttext
\feature[+][frac]%
Some ligatures: float, finance, affine; a fraction: 1/4.

\setcharacterkerning[narrow]Some ligatures: float, finance, affine; a fraction: 1/4.

\setcharacterkerning[wide]Some ligatures: float, finance, affine; a fraction: 1/4.

\stoptext

In my XML to PDF workflow, fractions are marked up, so it's easy to switch the kerning off only for them.

Instead i have no solution for ligatures: parts of text with a modified kerning loose ligatures, and i end up with the same words, once with ligatures, once without, even in the same page.
Is there a workaround for this?
character kerning is bad anyway ... say that we have:

effe

and this is

e ff e

you definitely don't want to kern like

e kern ff kern ff

but

e kern f kern f kern e

so, ligatures are pretty useless with intercharacter kerning (as per definecharacterning) ... just conceptually incomatible

(it is possible to turn it on but it really isnot what you want)


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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