13.0.0

- New experimental drawing and rendering libraries:
  * New public `hb-vector` API for vector output of glyph outlines. The only
    supported output format currently is SVG.
    The new API is available in a separate `harfbuzz-vector` library.
  * New public `hb-raster` API for rasterizing glyphs to A8 / BGRA32 images.
    The new API is available in a separate `harfbuzz-raster` library.
  * Both APIs are still experimental and subject to change.
  * Both libraries support monochrome as well as vector color glyph formats
    (`COLR` v0, v1, and `SVG`).
  * Additionally, `hb-vector` supports also bitmap color glyph formats (`CBDT`
    and `sbix`).
  * New command line utilities to accompany the new APIs: `hb-vector` and
    `hb-raster`. They share many of the same options as `hb-view`.

- New subset flag `HB_SUBSET_FLAGS_DOWNGRADE_CFF2` to convert instantiated
  `CFF2` table to `CFF `. This options will desubroutinize `CFF2` table and
  convert it to CID-keyed `CFF` table. This is useful for compatibility with
  older renderers that do not support `CFF2` table, including embedded
  instantiated fonts in PDF documents.

- The `hb-view` command-line utility got a few bells and whistles as well,
  including support for logical / ink extents (with the default being the union
  of both), stroke, and an option to rotate glyph foreground colors
  (rainbow coloring).

- New API to inspect color-glyph documents in `SVG` table.
- New API to signal that the buffer content was changed by the client in
  message callbacks.
- Improve `VARC` drawing accuracy with multiple transform / rounding fixes.
- Don’t reject malformed `cmap` subtables, a regression from 12.3.0 when we
  stopped sanitizing malformed tables.
- Disallow calling `hb_buffer_set_message_func()` from within the message
  callback.
- Various performance optimizations, fuzzing fixes, and documentation
  improvements.

- New API:

  * harfbuzz:
    +hb_buffer_changed()
    +hb_ot_color_get_svg_document_count()
    +hb_ot_color_get_svg_document_glyph_range()
    +hb_ot_color_glyph_get_svg_document_index()

  * harfbuzz-subset:
    +HB_SUBSET_FLAGS_DOWNGRADE_CFF2

  * harfbuzz-raster:
    +hb_raster_draw_t
    +hb_raster_extents_t
    +hb_raster_format_t
    +hb_raster_image_t
    +hb_raster_paint_t
    +hb_raster_draw_create_or_fail()
    +hb_raster_draw_destroy()
    +hb_raster_draw_get_extents()
    +hb_raster_draw_get_funcs()
    +hb_raster_draw_get_scale_factor()
    +hb_raster_draw_get_transform()
    +hb_raster_draw_get_user_data()
    +hb_raster_draw_glyph()
    +hb_raster_draw_recycle_image()
    +hb_raster_draw_reference()
    +hb_raster_draw_render()
    +hb_raster_draw_reset()
    +hb_raster_draw_set_extents()
    +hb_raster_draw_set_glyph_extents()
    +hb_raster_draw_set_scale_factor()
    +hb_raster_draw_set_transform()
    +hb_raster_draw_set_user_data()
    +hb_raster_image_clear()
    +hb_raster_image_configure()
    +hb_raster_image_create_or_fail()
    +hb_raster_image_destroy()
    +hb_raster_image_get_buffer()
    +hb_raster_image_get_extents()
    +hb_raster_image_get_format()
    +hb_raster_image_get_user_data()
    +hb_raster_image_reference()
    +hb_raster_image_set_user_data()
    +hb_raster_paint_clear_custom_palette_colors()
    +hb_raster_paint_create_or_fail()
    +hb_raster_paint_destroy()
    +hb_raster_paint_get_extents()
    +hb_raster_paint_get_funcs()
    +hb_raster_paint_get_scale_factor()
    +hb_raster_paint_get_transform()
    +hb_raster_paint_get_user_data()
    +hb_raster_paint_glyph()
    +hb_raster_paint_recycle_image()
    +hb_raster_paint_reference()
    +hb_raster_paint_render()
    +hb_raster_paint_reset()
    +hb_raster_paint_set_custom_palette_color()
    +hb_raster_paint_set_extents()
    +hb_raster_paint_set_foreground()
    +hb_raster_paint_set_glyph_extents()
    +hb_raster_paint_set_scale_factor()
    +hb_raster_paint_set_transform()
    +hb_raster_paint_set_user_data()

  * harfbuzz-vector:
    +hb_vector_draw_t
    +hb_vector_extents_mode_t
    +hb_vector_extents_t
    +hb_vector_format_t
    +hb_vector_paint_t
    +hb_vector_draw_create_or_fail()
    +hb_vector_draw_destroy()
    +hb_vector_draw_get_extents()
    +hb_vector_draw_get_funcs()
    +hb_vector_draw_get_scale_factor()
    +hb_vector_draw_get_transform()
    +hb_vector_draw_get_user_data()
    +hb_vector_draw_glyph()
    +hb_vector_draw_recycle_blob()
    +hb_vector_draw_reference()
    +hb_vector_draw_render()
    +hb_vector_draw_reset()
    +hb_vector_draw_set_extents()
    +hb_vector_draw_set_glyph_extents()
    +hb_vector_draw_set_scale_factor()
    +hb_vector_draw_set_transform()
    +hb_vector_draw_set_user_data()
    +hb_vector_paint_clear_custom_palette_colors()
    +hb_vector_paint_create_or_fail()
    +hb_vector_paint_destroy()
    +hb_vector_paint_get_extents()
    +hb_vector_paint_get_funcs()
    +hb_vector_paint_get_scale_factor()
    +hb_vector_paint_get_transform()
    +hb_vector_paint_get_user_data()
    +hb_vector_paint_glyph()
    +hb_vector_paint_recycle_blob()
    +hb_vector_paint_reference()
    +hb_vector_paint_render()
    +hb_vector_paint_reset()
    +hb_vector_paint_set_custom_palette_color()
    +hb_vector_paint_set_extents()
    +hb_vector_paint_set_foreground()
    +hb_vector_paint_set_glyph_extents()
    +hb_vector_paint_set_palette()
    +hb_vector_paint_set_scale_factor()
    +hb_vector_paint_set_transform()
    +hb_vector_paint_set_user_data()
    +hb_vector_svg_paint_set_flat()
    +hb_vector_svg_paint_set_precision()
    +hb_vector_svg_set_flat()
    +hb_vector_svg_set_precision()
13.0.0
13 files changed
tree: 5f86eeb5f47ae5f126de0aa0a41755716c33d478
  1. .ci/
  2. .github/
  3. docs/
  4. perf/
  5. src/
  6. subprojects/
  7. test/
  8. util/
  9. .clang-format
  10. .codecov.yml
  11. .editorconfig
  12. AUTHORS
  13. BUILD.md
  14. CMakeLists.txt
  15. CONFIG.md
  16. COPYING
  17. harfbuzz.doap
  18. HarfBuzz.jpg
  19. HarfBuzz.png
  20. meson.build
  21. meson_options.txt
  22. NEWS
  23. README.md
  24. README.mingw.md
  25. README.python.md
  26. RELEASING.md
  27. replace-enum-strings.cmake
  28. SECURITY.md
  29. TESTING.md
  30. THANKS
  31. xkcd.png
README.md

HarfBuzz

Linux CI Status macoOS CI Status Windows CI Status OSS-Fuzz Status Coverity Scan Build Status Packaging status OpenSSF Scorecard

HarfBuzz is a text shaping engine. It primarily supports OpenType, but also Apple Advanced Typography. Check “What is HarfBuzz?” chapter in the user manual for more inforamation on what HarfBuzz do and what it doesn’t do.

The canonical source tree and bug trackers are available on github. Both development and user support discussion around HarfBuzz happen on github as well.

For license information, see COPYING.

API stability

The API that comes with hb.h will not change incompatibly. Other, peripheral, headers are more likely to go through minor modifications, but again, we do our best to never change API in an incompatible way. We will never break the ABI.

The API and ABI are stable even across major version number jumps. In fact, current HarfBuzz is API/ABI compatible all the way back to the 0.9.x series. If one day we need to break the API/ABI, that would be called a new library.

As such, we bump the major version number only when we add major new features, the minor version when there is new API, and the micro version when there are bug fixes.

Documentation

For user manual as well as API documentation, check: https://harfbuzz.github.io

Download

Tarball releases of HarfBuzz are available on github releases page. At the same place you will also find Win32/Win64 binary bundles that include libharfbuzz DLL, hb-view.exe, hb-shape.exe, and all dependencies.

Development

For build information, see BUILD.md.

For custom configurations, see CONFIG.md.

For testing and profiling, see TESTING.md.

For using with Python, see README.python.md. There is also uharfbuzz.

For cross-compiling to Windows from Linux or macOS, see README.mingw.md.

To report bugs or submit patches please use github issues and pull-requests.

Developer documents

To get a better idea of where HarfBuzz stands in the text rendering stack you may want to read State of Text Rendering 2024. Here are a few presentation slides about HarfBuzz at the Internationalization and Unicode Conference over the years:

More presentations and papers are available on behdad's website. In particular, the following studies are relevant to HarfBuzz development:

Name

HarfBuzz (حرف‌باز) is the literal Persian translation of “OpenType”, transliterated using the Latin script. It also means “talkative” or “glib” (also a nod to the GNOME project where HarfBuzz originates from).

Background: Originally there was this font format called TrueType. People and companies started calling their type engines all things ending in Type: FreeType, CoolType, ClearType, etc. And then came OpenType, which is the successor of TrueType. So, for my OpenType implementation, I decided to stick with the concept but use the Persian translation. Which is fitting given that Persian is written in the Arabic script, and OpenType is an extension of TrueType that adds support for complex script rendering, and HarfBuzz is an implementation of OpenType complex text shaping.

Users

HarfBuzz is used in Android, Chrome, ChromeOS, Firefox, GNOME, GTK+, KDE, Qt, LibreOffice, OpenJDK, XeTeX, Scribus, PlayStation, Microsoft Edge, Amazon Kindle, Adobe Photoshop, Illustrator, InDesign, Godot Engine, Unreal Engine, QuarkXPress, Figma, and other places.

Distribution

Packaging status