[HarfBuzz] A few HarfBuzz-ng questions

Khaled Hosny khaledhosny at eglug.org
Wed Nov 17 15:21:27 PST 2010


On Wed, Nov 17, 2010 at 05:25:05PM -0500, Ed wrote:
> 2. SHAPERS: In void hb_shape(...) in hb-shape.cc, I see this:
> 
>       #if 0 && defined(HAVE_GRAPHITE)
>       ...
>       #endif
> 
> OK, please correct me if I am wrong, but looking here and at other
> files (i.e., hb-graphite.cc),  it looks to me like Martin Hosken has
> provided a way to tie Graphite into HarfBuzz and that "hb_shape()"
> will eventually be the wrapper function that switches between either a
> Graphite shaper or the HarfBuzz OpenType shaper.  And for the time
> being somebody has just commented out processing with Graphite via the
> "#if 0" statement.

The code with commented out because of recent changes to the API that
graphite code weren't ported to, yet.

> But in the future, wouldn't it be nicer if a user could CHOOSE which
> backend shaping engine to use instead of being forced to only use
> Graphite because the compiler saw "#if defined(HAVE_GRAPHITE)"?
> 
> In other words, something more like the following, which would default
> to HarfBuzz but would optionally allow any number of alternative
> shapers when available:

AFAIK, the current Graphite code is to be used only for graphite enabled
fonts, so it doesn't replace the OpenType shaper but supplement it.

[...]

> Wouldn't something like the above make it convenient to do testing
> across different shaping engines?
> 
> And I guess if you didn't want or need the flexibility of hb_shape(),
> then you could always just use hb_ot_shape directly, right?
> 
> But as it currently is written, I don't really get the point of
> hb_shape() if it is only there so Graphite testers can test Graphite
> with HB.  Graphite is not the only alternative backend processor,
> right?

Sorry, I'm not sure if I understand this question, the current Graphite
support means, if HB is compiled with Graphite support enabled, you can
use Graphite fonts with HB, it is not an alternative backed (graphite
can only process graphite fonts and vice versa).

> Also, as I understand it, it is now common for font developers to test
> their fonts on multiple platforms and to provide not only OpenType but
> also AAT-specific features in their fonts.  Danh Hong's work on the
> Khmer fonts comes to mind.  Wouldn't it be nice if a font developer
> could have a simple program based on HarfBuzz that would allow a font
> developer to easily and quickly test font rendering using different
> backends?  This would be especially useful for the complex text layout
> scripts of India, South East Asia, etc.  It would also be useful for
> Harfbuzz script module developers.  For example, I might want to take
> an SIL Graphite-based Burmese font which I know will render correctly
> using Graphite, and use it while actually writing the HarfBuzz shaper
> code for Burmese ...

If I understand correctly, you are considering fonts that would have
Graphite, OpenType and AAT in the same font file? IMHO that would really
be a bad idea, each should be in its own font file so the user can
easily select what complex layout technology to use by selecting the
appropriate font, I don't see what is the benefit of amalgamating all in
one font file and I can see possible issues that it would cause.

Regards,
 Khaled

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer



More information about the HarfBuzz mailing list