[luatex] How to query fonts.handlers

Henri Menke henrimenke at gmail.com
Mon Feb 4 03:00:12 CET 2019

Dear list,

I am trying to access extra kerning that I have defined using
fonts.handlers.otf.addfeature.  Even though I query the kerning from
within a paragraph where the kerning is evidently applied I can't seem
to get the value stored earlier, see the comment in the MWE.  What am I
doing wrong?

Cheers, Henri


\input luaotfload.sty

     fonts.handlers.otf.addfeature {
         name = "ktest",
         type = "kern",
         data = {
             ["t"] = { ["e"] = 500 },

\font\1="lmroman10-regular.otf:+ktest" at 10pt

     local fnt = font.current()
     local tfmdata = fonts.hashes.identifiers[fnt]
     local t = string.byte("t")
     local e = string.byte("e")
     local kern = fonts.handlers.otf.getkern(tfmdata,t,e)
     tex.sprint(kern) % 0 instead of 500. Why?


More information about the luatex mailing list