Hi Frederik,
Thanks, subscribing the ‘fontDidGenerate’ works. I manage to add the kern table to the generated font.
the only strange thing with ttLib.TTFont .save() function is that I couldn’t rewrite the same TTF file without a sstruct error:
“””error: unpack requires a string argument of length 32″””
I had to save into a new temporary file:
fontpath= info[“path”]
(head, tail) = path.split(fontpath)
tail = tail[:-4]
tail += ‘_kern.ttf’
fontpath_kern = path.join(head, tail)
tt = ttLib.TTFont(fontpath)
… some code…
tt.save(fontpath_kern)