[HarfBuzz] Template or sample code for writing a shaper for harfbuzz-ng?

Behdad Esfahbod behdad at behdad.org
Thu Jan 6 14:06:30 PST 2011


Hi all,

> How are new shaping engines going to be handled in harfbuzz-ng?  As
> plug-in modules, or as hard-coded files?

Hardcoded.


> Is there sample or template code somewhere that shows how one would
> write a new shaper for harfbuzz-ng?

hb-ot-shape* is really self-explanatory.


> Also are there any guidelines on general "do"s and "don't"s when
> writing shaping extensions for harfbuzz-ng in order to maximize
> efficiency and avoid pitfalls?

In general, the HarfBuzz design is a bit different from previous shapers we've
have had.  Before, each script shaper was responsible for all steps of the
shaping.  With HarfBuzz, we've consolidated the main body of the shaper, and
the shaper calls into the complex script-specific logic to make adjustments
when necessary.  Right now there is only two such hooks: collect_features()
and setup_masks().  But as we add more complex scripts, more hooks and more
features from the main shaper will definitely be needed.


> I hope that the API and code are sufficiently mature now that you can
> answer these questions or direct me to the appropriate resource(s).

It's not.  It will evolve based on what shapers require from it.  The first
step towards getting this more mature may be to write to the list about the
general structure of the OpenType shaping logic for the script you are
interested in.  In short: how should it work?

behdad


> Thanks!
> 
> -- Ed Trager
> _______________________________________________
> HarfBuzz mailing list
> HarfBuzz at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/harfbuzz
> 



More information about the HarfBuzz mailing list