HarfBuzz is a text shaping engine written in C++ that has evolved into a comprehensive font platform for rendering complex scripts and typography on modern screens. The project describes itself as the "ffmpeg of text shaping," indicating its role as a foundational tool in the text rendering ecosystem. It primarily supports OpenType font format while also providing support for Apple Advanced Typography, making it compatible with the major font technologies in use today.
The core functionality is provided through libharfbuzz, which handles text shaping along with draw and paint APIs, with highly configurable compilation options. The library integrates with multiple platform-specific backends including FreeType, macOS CoreText, Windows Uniscribe, DirectWrite, GDI, GLib, and Graphite2. A companion library, libharfbuzz-subset, enables font subsetting and variable-font instancing. Additional auxiliary libraries extend functionality through ICU Unicode integration, Cairo rendering support, and GObject bindings for language interoperability.
The project includes experimental libraries for advanced rendering capabilities. libharfbuzz-raster provides glyph rasterization to bitmaps with color font support, libharfbuzz-vector outputs glyphs to vector formats like SVG, and libharfbuzz-gpu encodes glyph outlines for GPU rasterization using the Slug algorithm with shader sources in GLSL, WGSL, MSL, and HLSL. The repository also provides command-line tools including hb-shape for text shaping, hb-view for rendering to images, hb-subset for font optimization, hb-info for metadata display, and specialized tools for raster and vector output.
Enhancement requests, invalid reports, and documentation improvements represent the most frequently labeled issue categories.
HarfBuzz prioritizes robustness, correctness, and performance in that order. The project maintains strict API and ABI stability, with the current version remaining compatible back to the 0.9.x series. The library is widely deployed across major platforms and applications including Android, Chrome, Firefox, Flutter, GNOME, Qt, LibreOffice, Adobe Creative Suite, Microsoft Edge, and gaming engines like Godot and Unreal Engine. An interactive playground at harfbuzz-world.cc allows users to experiment with shaping, subsetting, rasterization, and GPU rendering directly in a web browser. The project provides amalgamated source files for simplified builds and maintains comprehensive documentation alongside developer resources including presentations and technical studies on text rendering, caching strategies, and subsetting techniques.