<p dir="ltr">Hi Martin,</p>
<p dir="ltr">According to gmail, I've had four requests from you over the last four years, to add debugging API to HarfBuzz.</p>
<p dir="ltr">Every time I sit down with Jonathan to debug something in HB, I wish I have had added debugging API.  So when Jonathan had to leave early today, I decided to spend the rest of the day adding debugging API.  And, while it's nothing to brag about, I'm happy to say that I've done that now.</p>
<p dir="ltr">It's very simple library API: a single message() function that received buffer, font, and the text message.  The debugger API will be fully defined in terms of what's in the text message.  I believe this has the right balance between simplicity, expressiveness, and extensibility.</p>
<p dir="ltr">Right now there are not many messages, just one.  But we can together figure out what kind of message API is desired and patch towards that.</p>
<p dir="ltr">I already added "support" for this to hb-shape / hb-view as well as sample.py.  I envision we can add a libharfbuzz-support library as well, that adds a debugger object, colorful diff facilities, etc.  I also wonder weather some other functionality (buffer serialization?) should also move to the support library.</p>
<p dir="ltr">Let the discussion start!</p>
<p dir="ltr">Cheers,<br>
behdad</p>
<div class="gmail_quote">On Mar 25, 2015 9:59 AM, "Martin Hosken" <<a href="mailto:mhosken@gmail.com">mhosken@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Behdad,<br>
<br>
Thanks for your help in getting the debug output from hb. I've been playing and have some thoughts about how to use the existing debug framework to help with font development.<br>
<br>
1. It would be great if the HB_DEBUG variable controlled which categories of debug are output, rather than the depth. For example, I don't need the SANITIZE debug (and pretty much anything else than APPLY).<br>
<br>
2. It would be good if we can get the lookup index, somehow, into the debug report. I don't think it's stored in the lookup. But I may be wrong.<br>
<br>
3. Is there a way to print out the whole buffer as per, perhaps, the output from hb-shape. And can we call that from when a lookup starts.<br>
<br>
These would be the basics. I'm sort of thinking about creeping up on the problem rather than building some massive implementation layer either to the side or inside. If we can get the debug system to print at least the info we need, we can have it call a side library to do the debug reporting later on.<br>
<br>
TIA,<br>
Yours,<br>
Martin<br>
_______________________________________________<br>
HarfBuzz mailing list<br>
<a href="mailto:HarfBuzz@lists.freedesktop.org">HarfBuzz@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/harfbuzz" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/harfbuzz</a><br>
</blockquote></div>