[HarfBuzz] Adding support for other libraries (Fog)

Behdad Esfahbod behdad at behdad.org
Wed Jan 18 19:56:21 PST 2012


Hi Petr,

On 01/07/2012 12:31 PM, Petr Kobalíček wrote:
> Hello list,
> 
> my experiments with harfbuzz continue and I have some questions how is
> the preferred way of adding support for other libraries in harfbuzz.
> As I know that harfbuzz currently supports glib, icu, uniscribe,
> freetype, and maybe other libraries. I'd like to add support for Fog
> framework, but it's designed to be used only internally - Fog is going
> to always use harfbuzz, so there won't be a need to use Fog and
> harfbuzz separately.

It's a new situation, but I don't see any reason for not adding that code to
HarfBuzz.  It just wouldn't get any testing from my side, so it's your job to
make sure it's working.


> I added code which adds support for mutex, atomic operations, and
> unicode. Here I think that I should use "HAVE_FOG" macro, is that
> right? And what about ordering, where should I place HAVE_FOG check,
> before glib, after glib?

The order typically is more specific to more broad.  However, I would say if
user asks for --enable-fog, you probably want to make sure glib, ICU, etc are
NOT enabled.  Again, this is a very narrow and specific use of the library for
your internal build process.


> I'm quite confused here, because the support for all libraries is in a
> single file - it can be a mess if more libraries will be added into
> the harfbuzz, but I can live with it;)

Well, the master switch ought to be somewhere!


> My second question is related to the process of sending my changes to
> the harfbuzz. What is the preferred way of adding support for more
> libraries in harfbuzz? I mean is this somewhat limited or I'm free to
> send here the patches?

Send patches.  For bigger contributions, posting a git tree online is helpful.


> I'd like to keep Fog synchronized with harfbuzz tree so I like the
> idea that the support can be moved to harfbuzz and I'm able to
> maintain it, but I also understand that my code is going to be usable
> only when compiling with Fog, because of two-sided connection.

Yeah, as I said, it's a very special use, but I don't mind the extra 100 lines
of code that is not compiled for most people anyway. :)

behdad

> Best regards
> Petr Kobalicek
> _______________________________________________
> HarfBuzz mailing list
> HarfBuzz at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/harfbuzz
> 



More information about the HarfBuzz mailing list