[luatex] How to query fonts.handlers

Ulrike Fischer luatex at nililand.de
Wed Feb 6 09:54:57 CET 2019

Am Wed, 6 Feb 2019 13:10:04 +1300 schrieb Henri Menke:

> I have a working ConTeXt solution now, but I can't get the same thing to
> work in plain LuaTeX.

What doesn't work?

     local fnt = font.current()
     local tfmdata = fonts.hashes.identifiers[fnt]
     local t = string.byte("t")
     local e = string.byte("e")
     local kern = 0
     for _,kind in
pairs(table.keys(tfmdata.shared.rawdata.lookupcache)) do
         kern = kern + fonts.handlers.otf.getkern(tfmdata,t,e,kind)
     tex.sprint(kern / tfmdata.parameters.factor) }

works fine for me (my fontloader is a bit newer, but I doubt that it

Ulrike Fischer 

More information about the luatex mailing list