## HarfBuzz [[!img HarfBuzz.png] [[HarfBuzz|HarfBuzz]] is an [[OpenType|http://www.microsoft.com/OpenType/OTSpec/]] text shaping engine. There are two [[HarfBuzz|HarfBuzz]] code trees in existence today: * The current [[HarfBuzz|HarfBuzz]] tree, also known as harfbuzz-ng, is under active development and is what is used in Firefox, GNOME, recent versions of ChromeOS and Chrome Linux, among other places. The canonical source tree is available [[here|http://cgit.freedesktop.org/harfbuzz/]]. Also available on [[github|https://github.com/behdad/harfbuzz]]. See below for release tarballs. * The old [[HarfBuzz|HarfBuzz]] tree, derived from [[FreeType|http://freetype.org/]], [[Pango|http://pango.org/]], and [[Qt|http://qt-project.org/]], is available [[here|http://cgit.freedesktop.org/harfbuzz.old/]]. It is not actively developed or maintained, and is buggy. All users are encouraged to switch over to the new [[HarfBuzz|HarfBuzz]]. There are no release tarballs of old [[HarfBuzz|HarfBuzz]] whatsoever. ### Download For tarball releases of the new [[HarfBuzz|HarfBuzz]] codebase, look [[here|http://www.freedesktop.org/software/harfbuzz/release/]]. At the same place you will also find Win32 binary bundles that include libharfbuzz DLL, hb-view.exe, hb-shape.exe, and all dependencies. The API is not expected to change incompatibly, but we cannot guarantee that until [[HarfBuzz|HarfBuzz]] 1.0.0 is released. Other than that, we consider it very stable, and the API that comes with _hb.h_ is unlikely to change. API in _hb-ft.h_ and other peripheral headers are more likely to through reviews before 1.0. There are no tarball releases of the old [[HarfBuzz|HarfBuzz]] codebase available. If you want to use the old [[HarfBuzz|HarfBuzz]], just import it into your project. And be warned that you are on your own. If you are not sure whether Pango or [[HarfBuzz|HarfBuzz]] is right for you, read [[this|http://mces.blogspot.in/2009/11/pango-vs-harfbuzz.html]]. ### Building On Linux, install the development packages for [[FreeType|FreeType]], Cairo, and GLib. For example, on Ubuntu / Debian, you would do: * sudo apt-get install libfreetype6-dev libglib2.0-dev libcairo2-dev whereas on Fedora, RHEL, CentOS, and other Red Hat based systems you would do: * sudo yum install freetype-devel glib2-devel cairo-devel If you are using a tarball, you can now proceed to running configure and make as with any other standard package. That should leave you with a shared library in src/, and a few utility programs including hb-view and hb-shape under util/. If you are bootstraping from git, you need a few more tools before you can run autogen.sh for the first time. Namely, [[pkg-config|http://www.freedesktop.org/wiki/Software/pkg-config]] and ragel [[ragel|http://www.complang.org/ragel/]]. Again, on Ubuntu / Debian: * sudo apt-get install pkg-config ragel sudo apt-get install autoconf automake libtool sudo apt-get install gcc g++ and on Fedora, RHEL, CentOS: * sudo yum install pkgconfig ragel sudo yum install autoconf automake libtool sudo yum install gcc gcc-c++ ### Development To get a better idea of where [[HarfBuzz|HarfBuzz]] stands in the text rendering stack you may want to read [[State of Text Rendering|http://behdad.org/text/]]. Both development and user support discussion around [[HarfBuzz|HarfBuzz]] happens on the [[harfbuzz at lists freedesktop org|http://freedesktop.org/mailman/listinfo/harfbuzz/]] mailing list. Some of the developers frequent the #harfbuzz channel on freenode IRC server. If you write to the mailing list, you are guaranteed to get an answer. The same is not necessarily true about the IRC channel, or if you write to individual developers. Feel free to write to the list to tell us how you are using [[HarfBuzz|HarfBuzz]], or how well it has been suiting your project's needs. To report bugs or submit patches, you can either use [[bugzilla|https://bugs.freedesktop.org/enter_bug.cgi?product=HarfBuzz]], or the mailing list. Bugzilla is preferred, since we can track the issue until it has been fixed. For a comparison of old vs new [[HarfBuzz|HarfBuzz]] memory consumption see [[this|http://goo.gl/woyty]]. See past and upcoming [[HarfBuzz Hackfests|Software/HarfBuzz/Hackfests]] You can monitor various aspects of the project using the following online services: * The code is replicated on [[GitHub|https://github.com/behdad/harfbuzz]]; pull requests are responded to, * With each commit, all tests are run on [[Travis CI|https://travis-ci.org/behdad/harfbuzz/builds]], * Public API / ABI changes are tracked across releases on [[Upstream Tracker|http://upstream-tracker.org/versions/harfbuzz.html]], #### ICU LayoutEngine If your application uses ICU [[LayoutEngine|LayoutEngine]] library, there is a replacement library called _icu-le-hb_ [[here|https://github.com/behdad/icu-le-hb]] that uses [[HarfBuzz|HarfBuzz]] to provide the ICU [[LayoutEngine|LayoutEngine]] API. The C++ API is not ABI compatible, but the C API is. This library has not been tested seriously. If you use it, please report your experience to the mailing list.