Dear Behdad,

> For the curious, this is the PR:
> 
>   https://github.com/behdad/harfbuzz/pull/107
> 
> This basically uses dlopen to open libgraphite2.
> 
> I need to understand better what you are trying to address with this.  "A
> number of people have asked" does not quite justify it.  Why do people care?
> 
> Years ago I thought about doing this, specially since with all the
> integrations (FreeType, glib, gobject, icu, graphite2, more to come later),
> dynamic loading sounds very attractive.  But decided not to pursue that as it
> adds unnecessary complexity.  We just removed support for dynamic modules from
> Pango and I'm so glad we did...  I don't want to add those back to HarfBuzz
> unless we absolutely have to.
> 
> So, what are you trying to fix?

This aims to fix the "we don't care about Graphite. We aren't against it. 
Surely this should be integrated at some other level than ours?" response that 
I get when I try to get Graphite integrated in such a way that I can create 
applications that use Graphite. For example, chromium.org. This approach allows 
everyone to ignore the problem and for applications or system integrators to 
decide whether to support Graphite or not. By dynamically loading only when a 
Graphite font is encountered (and if a Graphite library is available), there is 
no extra cost to supporting Graphite for those not interested, and it allows 
those interested to integrate Graphite if they want. It actually goes in the 
opposite direction from modules since it says that Graphite doesn't have to 
ship with harfbuzz. In addition, the Graphite library is not tied to harfbuzz, 
like a true module would be. There are no modules to be 'managed' by harfbuzz. 
In effect, this allows harfbuzz to support Graphite, at the same time, not 
having to require harfbuzz users to ship with the Graphite library, unless they 
want to.

HTH,
Yours,
Martin

> 
> 
> Thanks,
> behdad
> 
> On 15-05-18 05:50 AM, Martin Hosken wrote:
> > Dear All,
> > 
> > A number of people have asked me for a mechanism by which graphite may be 
> > dynamically loaded only when a Graphite font is used. I've struggled with 
> > the notion of this, but I think I understand it now. I hope that this can 
> > help everyone to have what they want for minimal cost.
> > 
> > I've submitted a pull request on github for a patch that does the above.
> > 
> > This patch adds dynamic loading of graphite support for graphite fonts in 
> > harfbuzz. The three way configure option is now: --with-graphite2=no means 
> > no graphite support. --with-graphite2=yes means to build and link against 
> > an existing graphite library. --with-graphite2=auto means to build 
> > independently of any graphite library but to attempt to dynamically load 
> > graphite when a graphite font is encountered.
> > 
> > This patch has been built and tested on linux only at the moment.
> > 
> > Yours,
> > Martin
> > _______________________________________________
> > HarfBuzz mailing list
> > [email protected]
> > http://lists.freedesktop.org/mailman/listinfo/harfbuzz
> > 
_______________________________________________
HarfBuzz mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/harfbuzz

Reply via email to