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?
Massimiliano