[HarfBuzz] Request for quick/small Harfbuzz usage flow

Behdad Esfahbod behdad at behdad.org
Wed Oct 13 09:54:18 PDT 2010

On 10/13/10 03:36, Tom Hacohen wrote:
> Dear all,
> I need harfbuzz for diacritic positioning and character shaping (in many
> languages), or at least this is what I know I need from Harfbuzz now, am
> I missing anything? Is there anything more Harfbuzz does that I might be
> interested in?
> Anyhow, I would like, if possible, since there's no manual to read yet,
> to have a short list of functions worth taking a look at. I of course
> don't expect code snippets or anything a like, just what functions and
> data types I need to know about in order to use Harfbuzz for the
> purposes mentioned above, or even the usage flow.

I'll put code together soon, but in short: you need a face, a font, and a buffer.

If using FreeType, it's easy.  Setup your FT_Face (including setting size and
all), then use hb-ft.h facilities to create face and font.

Create your buffer and add your text.  You also need to set script, language,
and direction on the buffer.  The only other piece is a unicode_funcs to set
on the buffer.  You can get one from hb-glib.h.

When all that is done, you are ready to call hb_shape().


> Thanks in advance,
> Tom.

More information about the HarfBuzz mailing list