[HarfBuzz] Adding font debugging
Martin Hosken
mhosken at gmail.com
Wed Sep 5 02:44:41 PDT 2012
Dear Behdad,
It would be great if we could add a little telemetry to harfbuzz to make life easier for font developers so they can find out why their font behaves other than how they are expecting it to behave. In the Graphite project we've been working on a gui based debugger that does after the fact debugging. It runs a string through graphite and collects information from the engine about what it did and then presents that to the user so that they can work out why graphite did what it did rather than what they expected it to.
The approach we took in the graphite engine is to have it spit out a json dump describing the segment processing. While you would probably prefer to give the information via a callback mechanism, it's still the same idea. Thinking about the information that we dump and use, the main thing is that for every rule (lookup) we give the position in the glyph string where the lookup fired and then the glyph string after the lookup executes, along with which lookup executed (by index I assume). In the case of harfbuzz, I would also expect it to give the glyph string after pre-shaping giving all the glyphs and the features associated with each one. In the case of a contextual chaining lookup there probably needs to be a debug call made before the sublookup fires to say where in the string that lookup is executed and which lookup it is, and therefore what the match was.
HTH,
Yours,
Martin
More information about the HarfBuzz
mailing list