[HarfBuzz] harfbuzz documentation

Behdad Esfahbod behdad at behdad.org
Sun Jun 24 10:21:50 PDT 2012


Hi Werner,

Please find comments inline.

On 06/21/2012 04:01 PM, Werner LEMBERG wrote:
> 
> Behdad,
> 
> 
> given that there is zero documentation in harfbuzz, and your
> whitepaper
> 
>   http://lists.freedesktop.org/archives/harfbuzz/2009-August/000359.html
> 
> is three years old while harfbuzz has evolved a lot meanwhile, I
> wonder where I should start.  (BTW, you should temporarily add the
> above e-mail to the git archive.)

Yes, I should add an intro guide plus real API docs...

> Is there something *much* simpler than the programs in the `util'
> directory which holds some nifty C++ code which is not easy to
> comprehend?  I want to start using it for my ttfautohint program, but
> I neither have an idea how cairo works nor how glib is structured...
> In case these are prerequisites, it should be mentioned somewhere.

Yes, here's a much simpler thing:

  https://github.com/anoek/ex-sdl-cairo-freetype-harfbuzz


> BTW, it seems to me that harfbuzz is plain C disguised as C++, right?

Right.


> Below is a patch for current git so that autogen.sh works with
> automake 1.12.1.  I also suggest to add a README.git file which lists
> the various dependencies for bootstrapping, for example, pkg-config or
> gobject-introspection (this is new).

I'm in the process of fixing those (ie. keeping macros in-tree, etc).  Started
doing that on Friday then had to leave.


> Compiling with introspection set to true currently fails:
> 
>   GISCAN hb-1.0.gir
>     /usr/local/include/freetype2/freetype/config/ftconfig.h:354:
>       syntax error, unexpected '{', expecting ',' or ';' in '  {' at '{'
>     /usr/local/include/freetype2/freetype/config/ftconfig.h:358:
>       syntax error, unexpected identifier in
>                     '    __asm__ __volatile__ (' at '__asm__'
>     g-ir-scanner: hb: warning:
>       112 warnings suppressed (use --warn-all to see them)
>   GICOMP hb-1.0.gir
>     error parsing file hb-1.0.gir: Line 20, character 32:
>     The attribute 'name' on the element 'type' must be specified
> 
> What the heck are those GISCAN and GICOMP errors?

Lets just say that I hate gobject-introspection religiously...


> Compiling with introspection set to false fails too:
> 
>   make[2]: Entering directory `/home/wl/git/harfbuzz.compiled/src'
>   /usr/share/gobject-introspection-1.0/Makefile.introspection:150:
>     *** Need to define hb_1_0_gir_FILES.  Stop.

Ugh...  I just turned it off again until I figure out what to do...

Hope that helps :(.  Feel free to grab the tarball here instead of building git:

  http://www.freedesktop.org/software/harfbuzz/release/

behdad

> So I'm stuck...
> 
> 
>     Werner
> 
> 
> ======================================================================
> 
> 
> diff --git a/configure.ac b/configure.ac
> index fc930e9..9da7f58 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -11,6 +11,10 @@ AC_CONFIG_HEADERS([config.h])
>  AM_INIT_AUTOMAKE([1.11.1 gnu dist-bzip2 no-dist-gzip -Wall no-define])
>  AM_SILENT_RULES([yes])
>  
> +# AM_PROG_AR is new in automake 1.11.2;
> +# however, MinGW doesn't have it yet (June 2012)
> +m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
> +
>  # Initialize libtool
>  LT_PREREQ([2.2])
>  LT_INIT([disable-static])
> @@ -195,6 +199,10 @@ fi
>  
>  dnl ===========================================================================
>  
> +AM_CONDITIONAL([HAVE_INTROSPECTION], [true])
> +
> +dnl ===========================================================================
> +
>  AC_CONFIG_FILES([
>  Makefile
>  harfbuzz.pc
> _______________________________________________
> HarfBuzz mailing list
> HarfBuzz at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/harfbuzz
> 



More information about the HarfBuzz mailing list