Skip to main content

Streamlined Cython bindings for the harfbuzz shaping engine

Project description

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.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uharfbuzz-0.56.0b1.tar.gz (2.0 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

uharfbuzz-0.56.0b1-pp311-pypy311_pp73-win_amd64.whl (1.4 MB view details)

Uploaded PyPyWindows x86-64

uharfbuzz-0.56.0b1-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (1.7 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

uharfbuzz-0.56.0b1-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (1.6 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

uharfbuzz-0.56.0b1-pp311-pypy311_pp73-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded PyPymacOS 11.0+ ARM64

uharfbuzz-0.56.0b1-pp311-pypy311_pp73-macosx_10_15_x86_64.whl (1.5 MB view details)

Uploaded PyPymacOS 10.15+ x86-64

uharfbuzz-0.56.0b1-cp310-abi3-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.10+Windows x86-64

uharfbuzz-0.56.0b1-cp310-abi3-win32.whl (1.1 MB view details)

Uploaded CPython 3.10+Windows x86

uharfbuzz-0.56.0b1-cp310-abi3-pyemscripten_2026_0_wasm32.whl (853.0 kB view details)

Uploaded CPython 3.10+PyEmscripten 2026.0 wasm32

uharfbuzz-0.56.0b1-cp310-abi3-pyemscripten_2025_0_wasm32.whl (855.1 kB view details)

Uploaded CPython 3.10+PyEmscripten 2025.0 wasm32

uharfbuzz-0.56.0b1-cp310-abi3-musllinux_1_2_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ x86-64

uharfbuzz-0.56.0b1-cp310-abi3-musllinux_1_2_aarch64.whl (2.8 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

uharfbuzz-0.56.0b1-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

uharfbuzz-0.56.0b1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (1.8 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

uharfbuzz-0.56.0b1-cp310-abi3-macosx_10_9_universal2.whl (3.0 MB view details)

Uploaded CPython 3.10+macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file uharfbuzz-0.56.0b1.tar.gz.

File metadata

  • Download URL: uharfbuzz-0.56.0b1.tar.gz
  • Upload date:
  • Size: 2.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for uharfbuzz-0.56.0b1.tar.gz
Algorithm Hash digest
SHA256 e45e3d9250aaafd4d939aa7c3ee5b9aac8c184de7ee41c3187549265d4c3d3d8
MD5 76419e36c2f1ea9c348bbf7e23c1b7d7
BLAKE2b-256 d6617575f0d80091d2935a17f4486628d995b6794908a4675df9e10d3451cc30

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.56.0b1.tar.gz:

Publisher: ci.yml on harfbuzz/uharfbuzz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uharfbuzz-0.56.0b1-pp311-pypy311_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for uharfbuzz-0.56.0b1-pp311-pypy311_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 516d999b096d6791253665f7ac9d64b21bb0e834eb040b6642d834e7c9717588
MD5 8c92589c2387c1efbeb15010cf4d40c4
BLAKE2b-256 5e129f3f05e7a207659577da10b96a820bcc1b9a41ec0d26a9f92c2d07308901

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.56.0b1-pp311-pypy311_pp73-win_amd64.whl:

Publisher: ci.yml on harfbuzz/uharfbuzz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uharfbuzz-0.56.0b1-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for uharfbuzz-0.56.0b1-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 25b99c1bf5c1143318eb50149a6c9e3960d21895c7bdc8e178756eb2d72ba0a5
MD5 e7708b9705bebfbde84eca419b128a97
BLAKE2b-256 b0faa355fa72ca5f3e0c1cef571df8293a5bf41bbfea5b4417c3c99e3834af8b

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.56.0b1-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: ci.yml on harfbuzz/uharfbuzz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uharfbuzz-0.56.0b1-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for uharfbuzz-0.56.0b1-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 4f6ec26804a60eb11c9389abea0f0817f87800ca11dc23cb2e47a230262d5af5
MD5 ae2d99cdeee66884a1f771a3433e9053
BLAKE2b-256 aa06b1e84dc2ae5984949b50fb86f8ead5f4114da0319a6ddc51d8359b0aac38

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.56.0b1-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: ci.yml on harfbuzz/uharfbuzz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uharfbuzz-0.56.0b1-pp311-pypy311_pp73-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for uharfbuzz-0.56.0b1-pp311-pypy311_pp73-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 76cc789bf1c6609366f2800c165fe69d55c45b8e6949bafc32dc8b46e9597743
MD5 eb5ab5414670b7fc5e66854feb3dcce0
BLAKE2b-256 7f02997ddd5c0d9eb38301ad3e2e770349c77c22c2090b92500d344a7e01d5e6

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.56.0b1-pp311-pypy311_pp73-macosx_11_0_arm64.whl:

Publisher: ci.yml on harfbuzz/uharfbuzz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uharfbuzz-0.56.0b1-pp311-pypy311_pp73-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for uharfbuzz-0.56.0b1-pp311-pypy311_pp73-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 77cf7a327aae01b889aab250f55e944c3c55d39a0f7f63bdc04ab9c0cf9c7b30
MD5 f864005e256c0fe9b55b459934f6b3c7
BLAKE2b-256 f5e16c22ff35454a8a7e100c9a2ad9583c767e4f20a16c83c322bec3fa413268

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.56.0b1-pp311-pypy311_pp73-macosx_10_15_x86_64.whl:

Publisher: ci.yml on harfbuzz/uharfbuzz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uharfbuzz-0.56.0b1-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: uharfbuzz-0.56.0b1-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for uharfbuzz-0.56.0b1-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 c8e5ffc80e47ae3060ae7ca53390c85162176e69a9b0a0c824647ce8addb440e
MD5 a194a3127c49e20eebb7cbf990d0e200
BLAKE2b-256 0c02f9e3f51789f31a2d9a2ea41c6026bff4fdb8e40dd1be36dbdb6d739c7bc0

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.56.0b1-cp310-abi3-win_amd64.whl:

Publisher: ci.yml on harfbuzz/uharfbuzz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uharfbuzz-0.56.0b1-cp310-abi3-win32.whl.

File metadata

  • Download URL: uharfbuzz-0.56.0b1-cp310-abi3-win32.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.10+, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for uharfbuzz-0.56.0b1-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 b20ce2336090ab5acfef1d72709a32e9dd09872c8e02d82bfb3327fd642e45ad
MD5 6bac775b02621f0bd81c0a942f796546
BLAKE2b-256 ed7e603c7cb035edb46c907c8861a487cd7d86ddad51bb392f6e8ae14c9c62b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.56.0b1-cp310-abi3-win32.whl:

Publisher: ci.yml on harfbuzz/uharfbuzz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uharfbuzz-0.56.0b1-cp310-abi3-pyemscripten_2026_0_wasm32.whl.

File metadata

File hashes

Hashes for uharfbuzz-0.56.0b1-cp310-abi3-pyemscripten_2026_0_wasm32.whl
Algorithm Hash digest
SHA256 0d09b1d74089211b827c8f7c7a65c66a31795f56730e6b2d654f654500972e25
MD5 b93ece8967231df2b9cc8303bf20403f
BLAKE2b-256 9406c0f2f704791a8aabb0b4ed27d577ec97d67fc0ceb72c0bc55d849b04d62d

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.56.0b1-cp310-abi3-pyemscripten_2026_0_wasm32.whl:

Publisher: ci.yml on harfbuzz/uharfbuzz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uharfbuzz-0.56.0b1-cp310-abi3-pyemscripten_2025_0_wasm32.whl.

File metadata

File hashes

Hashes for uharfbuzz-0.56.0b1-cp310-abi3-pyemscripten_2025_0_wasm32.whl
Algorithm Hash digest
SHA256 ed13c29a633f623a123466cd9dcb41e6a98e84ae3e66ff200735607e5bbe1f7e
MD5 213fe4c0a502332c129fc1021cb490a0
BLAKE2b-256 611843c07013183faf695b4ff39d515a51b8658bca47b7c7b8c816263233108f

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.56.0b1-cp310-abi3-pyemscripten_2025_0_wasm32.whl:

Publisher: ci.yml on harfbuzz/uharfbuzz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uharfbuzz-0.56.0b1-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for uharfbuzz-0.56.0b1-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b3ef48b237edcb8632cc6928a679c1742ff8d70f38b1f4e2e21006c0827e39db
MD5 55e849ad132e8cb2fc1f79df1784aeb9
BLAKE2b-256 7cd086cfe767fcc7f5464068c205619b4a74fb0be208389cf8b2d643a2ae0336

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.56.0b1-cp310-abi3-musllinux_1_2_x86_64.whl:

Publisher: ci.yml on harfbuzz/uharfbuzz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uharfbuzz-0.56.0b1-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for uharfbuzz-0.56.0b1-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 53539f8fa5890ff320426dce7b0771b67a516d71826594324a6ae41f501f6b47
MD5 dfbe858827ce26edcfcf9817ee5803f4
BLAKE2b-256 dc40785c4fea93af899577755852c7fdc8e4bafe86d29cd53b2f7da632365793

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.56.0b1-cp310-abi3-musllinux_1_2_aarch64.whl:

Publisher: ci.yml on harfbuzz/uharfbuzz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uharfbuzz-0.56.0b1-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for uharfbuzz-0.56.0b1-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3e7b3c0e157c0cd4ec91250cccb981bac022a306de262e1fda672a4532a8bd68
MD5 371410e519ef09e078fb6cd8ed7819a3
BLAKE2b-256 3bcf8b0c9186be3ad680855e526b1cbe5261a9b36966bea85ffe44fb6dbf2e05

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.56.0b1-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: ci.yml on harfbuzz/uharfbuzz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uharfbuzz-0.56.0b1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for uharfbuzz-0.56.0b1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 41d5d4ca7b4aa27ae3d82606aea394fd6b4647f9ccbc97f123329bcec9a6c7e4
MD5 7463cc7dad7136826d21d3989b5c7d83
BLAKE2b-256 1de3b6676466ac1ed1ea145b0c1f4fcd31420ddcda53e8bf4da41a8dd2da71d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.56.0b1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: ci.yml on harfbuzz/uharfbuzz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uharfbuzz-0.56.0b1-cp310-abi3-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for uharfbuzz-0.56.0b1-cp310-abi3-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 5b34d60c4e1a0088345c6b51a3835d1746bdb77bac722d63b2f1046c0f488132
MD5 70d77fc09626d3d019c6e3adbfa89daa
BLAKE2b-256 4e87fe482f03f5d298959247d8f73a3c5e0d79889a1bc164dc4ad3e82e37d64a

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.56.0b1-cp310-abi3-macosx_10_9_universal2.whl:

Publisher: ci.yml on harfbuzz/uharfbuzz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page