uharfbuzz 0.55.0


pip install uharfbuzz

  Latest version

Released: Jun 03, 2026

Project Links

Meta
Author: Adrien Tétar
Requires Python: >=3.10

Classifiers

uharfbuzz

uharfbuzz Logo

Build + Deploy PyPI Documentation Status

Streamlined Cython bindings for the HarfBuzz shaping engine.

Example

import sys

import uharfbuzz as hb


fontfile = sys.argv[1]
text = sys.argv[2]

blob = hb.Blob.from_file_path(fontfile)
face = hb.Face(blob)
font = hb.Font(face)

buf = hb.Buffer()
buf.add_str(text)
buf.guess_segment_properties()

features = {"kern": True, "liga": True}
hb.shape(font, buf, features)

infos = buf.glyph_infos
positions = buf.glyph_positions

for info, pos in zip(infos, positions):
    gid = info.codepoint
    glyph_name = font.glyph_to_string(gid)
    cluster = info.cluster
    x_advance = pos.x_advance
    y_advance = pos.y_advance
    x_offset = pos.x_offset
    y_offset = pos.y_offset
    print(
        f"{glyph_name=} {gid=} {cluster=} "
        f"{x_advance=} {y_advance=} "
        f"{x_offset=} {y_offset=}"
    )

Installation

When building the uharfbuzz package, it automatically incorporates minimal HarfBuzz sources so you don't have to install the native HarfBuzz library.

However, if you want to use uharfbuzz with your system-provided HarfBuzz (e.g., if you built it from sources with custom configuration), you can set USE_SYSTEM_LIBS=1 environment variable (see example below).

USE_SYSTEM_LIBS=1 pip install uharfbuzz --no-binary :uharfbuzz:

harfbuzz installation is found using pkg-config, so you must have harfbuzz's .pc files in your system. If you've built it from sources, meson installs them automatically. Otherwise, you may want to install harfbuzz development package, like harfbuzz-devel on Fedora-derived distros.

How to make a release

Use git tag -a to make a new annotated tag, or git tag -s for a GPG-signed annotated tag, if you prefer.

Name the new tag with with a leading ‘v’ followed by three MAJOR.MINOR.PATCH digits, like in semantic versioning. Look at the existing tags for examples.

In the tag message write some short release notes describing the changes since the previous tag. The subject line will be the release name and the message body will be the release notes.

Finally, push the tag to the remote repository (e.g. assuming upstream is called origin):

$ git push origin v0.4.3

This will trigger the CI to build the distribution packages and upload them to the Python Package Index automatically, if all the tests pass successfully. The CI will also automatically create a new Github Release and use the content of the annotated git tag for the release notes.

0.56.0b1 Jun 14, 2026
0.55.0 Jun 03, 2026
0.54.1 Apr 30, 2026
0.54.0 Apr 28, 2026
0.53.7 Apr 20, 2026
0.53.6 Apr 01, 2026
0.53.3 Jan 24, 2026
0.53.2 Dec 28, 2025
0.53.1 Dec 24, 2025
0.53.0 Dec 07, 2025
0.52.0 Oct 19, 2025
0.51.7 Oct 13, 2025
0.51.6 Sep 28, 2025
0.51.5 Sep 17, 2025
0.51.4 Aug 30, 2025
0.51.3 Aug 26, 2025
0.51.2 Aug 20, 2025
0.51.1 Jul 27, 2025
0.51.0 Jul 21, 2025
0.50.2 May 10, 2025
0.50.0 Apr 28, 2025
0.49.0 Apr 04, 2025
0.48.0 Mar 28, 2025
0.47.0 Mar 24, 2025
0.46.0 Mar 02, 2025
0.45.0 Jan 11, 2025
0.44.0 Dec 25, 2024
0.43.0 Nov 25, 2024
0.42.0 Nov 05, 2024
0.41.1 Oct 29, 2024
0.41.0 Sep 24, 2024
0.40.1 Sep 19, 2024
0.40.0 Sep 19, 2024
0.39.5 Aug 23, 2024
0.39.5b1 Aug 23, 2024
0.39.3 Jun 28, 2024
0.39.1 Mar 17, 2024
0.39.0 Feb 04, 2024
0.38.0 Dec 27, 2023
0.37.3 Sep 11, 2023
0.37.2 Jul 31, 2023
0.37.1.post1 Jul 20, 2023
0.37.1 Jul 19, 2023
0.37.0 May 10, 2023
0.36.0 Apr 27, 2023
0.35.0 Mar 13, 2023
0.34.0 Mar 03, 2023
0.33.0 Dec 17, 2022
0.32.0 Oct 28, 2022
0.31.0 Oct 08, 2022
0.30.0 Jul 31, 2022
0.29.0 Jul 29, 2022
0.28.0 Jul 23, 2022
0.27.1b1 Jul 18, 2022
0.27.0 Jun 30, 2022
0.26.0 May 22, 2022
0.25.0 Apr 24, 2022
0.24.1 Apr 03, 2022
0.24.0 Apr 02, 2022
0.23.0 Mar 23, 2022
0.22.0 Mar 12, 2022
0.21.0 Feb 08, 2022
0.20.0 Jan 31, 2022
0.19.0 Dec 04, 2021
0.18.0 Aug 24, 2021
0.17.1 Aug 06, 2021
0.17.0 Jul 24, 2021
0.16.1 May 18, 2021
0.16.0 May 09, 2021
0.15.0 Mar 22, 2021
0.14.1a2 Feb 17, 2021
0.14.1a1 Feb 17, 2021
0.14.0 Sep 30, 2020
No dependencies