[HarfBuzz] graphite 1.0.1 released

Martin Hosken mhosken at gmail.com
Mon Aug 8 01:32:15 PDT 2011

Dear Shriramana,

> 1) If a font has both OT and Graphite tables, which would be chosen?

By default, Graphite. But you can change the priority order either within your application or by setting an environment variable. It makes more sense to put Graphite first, since more fonts have both Graphite and OT than have Graphite alone or OT alone. And Graphite tends to give people more precise control.

> 2) Is there any overhead to using Graphite via HB rather than OT caused 
> by the additional external (?) library of Graphite compared to the OT 
> code being *within* the Graphite code corpus itself?

What I *think* you are asking is how much does the test for a Graphite font slow things up. Well it's basically a search for a Silf table. If it is not present then OT rendering happens. That depends on how many tables are in the font, but in comparison to loading an opentype font, it's next to nothing. This could be sped up if there were a flag in the face for such things to cache the result of a failed load.

OTOH you may have been asking how much it costs Graphite to be part of HB. The answer to that is it costs about O(2N) over all the glyphs in a segment to unpack all the information to put it into a form that looks like output from HB.

Neither of these are large costs.


More information about the HarfBuzz mailing list