Support “Debg” table

FontTools/fontc support a proprietary Debg table that stores lookup names and locations, and tools like Crowbar use it to show lookup names when debuging compiled feature code which is quite helpful in fonts with lots of lookups (otherwise you get feature tags and/or lookup numbers).

What kind of support are you looking for? Round-tripping the table when opening a binary file? Or that Glyphs implements an export options to also generate a Debg table? For the latter, is there a specification?

The later, yes.

There is no specification, but the table is simple. It is a JSON dictionary keyed by lookup numbers. See the relevant FontTools and fontc PRs.

I certainly wanted to implement a table like this, so it’s good that there is some consensus forming. Looking at the PRs, the format itself is still described more as a draft than a spec.

Last time I investigated such a table, I think lookup unification was causing issues with mapping cleanly from the binary back to the source. I’ll have a look at how the current Debg table handles such cases.

1 Like

There is certainly room for improvement, but in my experience using Debg table, it is already goes a long way in improving the experience of debugging lookup application in a binary font and being able to map lookups back to source features.

Looks good.