I use ConTeXt and Lucida OTF fonts, and I would like to adjust the kerning in math between the prime and the left parenthesis. Let us look at this example:
\startluacode
fonts.handlers.otf.addfeature {
name = "kerntest",
type = "kern",
data = {
[0x61] = { [0x62] = -150 }, -- a and b in text
[0x1d44e] = { [0x1d44f] = -150 }, -- mathematical italic small a and b
[0x02032] = { [0x00028] = -150 }, -- prime and left parenthesis
}
}
\stopluacode
\definefontfeature[kerntest][kerntest=yes]
\definefontfamily[lucidaopentype][rm][Lucida Bright OT]
\definefontfamily[lucidaopentype][mm][Lucida Bright Math OT]
\setupbodyfont[lucidaopentype,10pt]
\startTEXpage[offset=3pt]
abba $abba f'(x)$
\addff{kerntest}
abba $abba f'(x)$
I prefer $f'\mkern-3mu(x)$
\stopTEXpage
The output with a new version of ConTeXt MKIV is the following:
As you can see I am able (after reading on pages 178 and 179 of this font manual) to adjust the kerning between the characters a and b, if in text, but not in math. Also, and more important, the spacing between the prime and the left parenthesis is unchanged (I admit that my approach was a bit naive).
Question I there a way, without messing things up, to change the kerning between prime and left parenthesis in math mode automatically through the whole document?
You might assume that I never use constructions like f'\left(
or f'\bigl(
or similar, but of course it is extra good if the solution also works for them. Just to emphasize, I work in ConTeXt, so I am looking for a solution that works in ConTeXt. Probably the solution will be lua based, and then there is of course the bonus that it will also work in lualatex.
Additional question This is probably opinion based, so I prefer if we focus on the first question. Could this issue perhaps be considered as a bug in the Lucida OpenType font?
I have tried some other open type fonts, both with lualatex and ConTeXt, and many of them have, in my opinion, non-optimal space between the prime and the parenthesis. Still, I imagine this is not an engine (luaotfload?) problem, but something that could/should be fixed in the fonts.