A complete HarfBuzz text shaping algorithm port to Rust, enabling font shaping without C++ dependencies.
rustybuzz is a Rust port of the HarfBuzz text shaping algorithm, which processes Unicode text and font data to produce positioned glyphs for rendering. It solves the problem of complex text layout (e.g., for scripts like Arabic or Devanagari) without requiring C++ dependencies or system libraries. The library is designed as a drop-in alternative for HarfBuzz in Rust projects.
Rust developers working on text rendering, font tools, or GUI frameworks who need a reliable, safe, and dependency-free text shaping solution. It's also suitable for projects aiming to avoid C++ toolchains.
Developers choose rustybuzz for its pure Rust implementation, which simplifies builds and enhances safety, while maintaining high compatibility with HarfBuzz. It offers a self-contained, no-fuss alternative without sacrificing core shaping functionality.
A complete harfbuzz's shaping algorithm port to Rust
Eliminates the need for a C++ compiler and system library linking, simplifying dependency management as highlighted in the README's 'Why?' section.
Passes 2221 out of 2252 harfbuzz shaping tests, ensuring near-identical output for most use cases, as stated in the 'Conformance' section.
The library is almost entirely safe Rust with minimal unsafe usage, enhancing reliability and security, as noted in the 'Safety' section.
Avoids external dependencies on libraries like FreeType or ICU, making integration straightforward without external toolchains, per the 'Key Features'.
Benchmarks show rustybuzz is 1.5-2x slower than harfbuzz, as admitted in the 'Performance' section, which could impact real-time rendering.
Subsetting is removed, and there's no Arabic fallback shaper or support for tables like 'mort' and 'avar2', limiting functionality for advanced typography.
Lacks integration with system font libraries (e.g., FreeType, CoreText), requiring manual font handling, which complicates applications relying on native services.
Shaping always uses UnitsPerEm without a font size property, so users must scale glyphs manually, adding extra steps post-shaping.
rustybuzz is an open-source alternative to the following products:
A cross-platform, safe, pure-Rust graphics API.
Sketch and take handwritten notes.
[maintenance mode] A low-overhead Vulkan-like GPU API for Rust.
Safe and rich Rust wrapper around the Vulkan API
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.