[HarfBuzz] Thoughts on harfbuzz API

Behdad Esfahbod behdad at behdad.org
Sat Dec 5 09:50:25 PST 2009

On 12/04/2009 03:09 AM, Martin Hosken wrote:
> Dear All,
> I'm in the process of writing a python wrapper to help with testing harfbuzz before hopefully integrating Graphite. This gives me a good way to review the API :) and here are some thoughts.

Thanks Martin.

> 1. Features
> Currently a feature in hb-shape.h is defined as an association between two char * over a range. My understanding of all smart font technologies is that they work with longs. So I would suggest making the name and value entries unsigned longs rather than char *.

That may be true, but from a user point of view, I'd rather keep it as generic 
as possible.  Jonathan and I discussed also providing an integer API, and that 
most probably will happen at some point, but I want to keep the hb_shape() API 
as is.

> 2. Script and Lang
> Currently script and lang values are enums.

Are they?  Script is, but not lang:

typedef const void *hb_language_t;

hb_language_from_string (const char *str);

const char *
hb_language_to_string (hb_language_t language);

For script, we need the Unicode script anyway.  Though we would allow, for 
example, providing the OpenType script tag directly too.


> Yours, humbly submitted,
> Martin
> _______________________________________________
> HarfBuzz mailing list
> HarfBuzz at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/harfbuzz

More information about the HarfBuzz mailing list