[luatex] How to insert mathkerns?

Henri Menke henrimenke at gmail.com
Sat Sep 15 07:50:04 CEST 2018

Dear list,

I'm trying to add mathkerns to a font on the fly.  I adapted the code
from ConTeXt in good-mth.lua but nothing happens.  How can I make this
work?  MWE below.
N.B. I'm using 1.09.0 svn6938 with Ulrike's fontloader 2018-09-01

Cheers, Henri


\input luaotfload.sty
function kern_right_fence(tfmdata)
    if tfmdata.mathparameters then
        local characters = tfmdata.characters
        if characters[0x1D44E] then % we have at least an italic a
            print("PATCHING FONT " .. tfmdata.psname)
            characters[0x1D453].mathkerns = {
                force = true,
                bottomright = { { kern = 1000 } },
                           "kern right fence")

\font\lmmath="Latin Modern Math:script=math;" at 10pt




More information about the luatex mailing list