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.0.tar.gz (38.6 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.0-pp311-pypy311_pp73-win_amd64.whl (1.4 MB view details)

Uploaded PyPyWindows x86-64

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

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

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

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

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

Uploaded PyPymacOS 11.0+ ARM64

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

Uploaded PyPymacOS 10.15+ x86-64

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

Uploaded CPython 3.10+Windows x86-64

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

Uploaded CPython 3.10+Windows x86

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

Uploaded CPython 3.10+PyEmscripten 2026.0 wasm32

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

Uploaded CPython 3.10+PyEmscripten 2025.0 wasm32

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

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

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

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

uharfbuzz-0.56.0-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.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (1.9 MB view details)

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

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

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

File details

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

File metadata

  • Download URL: uharfbuzz-0.56.0.tar.gz
  • Upload date:
  • Size: 38.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for uharfbuzz-0.56.0.tar.gz
Algorithm Hash digest
SHA256 77f4ad1c9f32f44cc6f0c0c4f98fab54587719c96c810a043d01669f704d3e0c
MD5 8b260e82430c03980ee1e988fa71438f
BLAKE2b-256 5885c7545959fdf6b9377b926c826f6d80bddf034ac361b09306d430a0f556a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.56.0.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.0-pp311-pypy311_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for uharfbuzz-0.56.0-pp311-pypy311_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 d8768c480c1474f856da26a2e7195ca24c25fdb08e71a8d2ea30b50a413df1a7
MD5 e68533e2cc5d7c52db6ee82ce2d1e80e
BLAKE2b-256 f750b41d4b0ee13b6f152c912fb052ccea437bd0642c92824b779a20b87e1958

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.56.0-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.0-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.0-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 84aafa43bf29729d839ae7eabdbbfe86bea2b3a8594195231b79b94a7f5be07d
MD5 45726a7a341855941e6cbdb8869f8b1b
BLAKE2b-256 2e3a2947144fe8f87e7056051cfe44877aa8f04b47d86e12168457598bb27c91

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.56.0-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.0-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for uharfbuzz-0.56.0-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0c707baaeabf3d90ae3fde6e12cdfa05a3f77b754aaa4b930a527aaf9d165d0e
MD5 5841966c8b93c464f20ef10d1ba8ffd3
BLAKE2b-256 c7fa86c9601eb879fe858410a0bb74498c91186acd95f7d3fbec08717521ae72

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.56.0-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.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for uharfbuzz-0.56.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4d5885586ccf247dff92033fdc15988c4c4931406e0faa445d0c6f0941061dc4
MD5 e1010590939a87f6b33837472b926f85
BLAKE2b-256 ede12aeecb52d043a0da02807a6dddcdb0399caebfbd2fdd17f0655668dbbf82

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.56.0-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.0-pp311-pypy311_pp73-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for uharfbuzz-0.56.0-pp311-pypy311_pp73-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 c4507b64a4c53fe9af89a47efbacffd707b20bb8afb3714f970390cd4319e476
MD5 389019c466e801a3f65e8bb86c6745e3
BLAKE2b-256 1819e7f0a7c139a419fc890de5a5314dee8ae16f5a49cdc0632ad4bb07957a22

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.56.0-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.0-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: uharfbuzz-0.56.0-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/7.0.0 CPython/3.13.14

File hashes

Hashes for uharfbuzz-0.56.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 0e7c628f327ce862a8606de93766f001704a5201e97d598686730ef2c1605c03
MD5 1b2a2bc5b67ef0711a83acf85a5474b1
BLAKE2b-256 96846c63afa111bcaed79ac011fc112c4a8d8cb60904ff5999f2e435bb79db4a

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.56.0-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.0-cp310-abi3-win32.whl.

File metadata

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

File hashes

Hashes for uharfbuzz-0.56.0-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 45413c77ffdcec7ba94a3e6b8c3af384a28688dafee4bbf343afb85249af3f9a
MD5 ed15a0d71370994f43b2e9a2939016cc
BLAKE2b-256 c0e6c1d4bfa188eec34fec251a907d770840387272f2d2b90ec172a968df0904

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.56.0-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.0-cp310-abi3-pyemscripten_2026_0_wasm32.whl.

File metadata

File hashes

Hashes for uharfbuzz-0.56.0-cp310-abi3-pyemscripten_2026_0_wasm32.whl
Algorithm Hash digest
SHA256 2ac2c4d59d0059265cad9d6c005dd330d36b2b4a2068626db7d09a1c18e5a05c
MD5 0e3519e54e0f8e5a360605f1040c0774
BLAKE2b-256 a2db4de0c571a8920e00f3c108d0bfda5d170111b670a7e1b5c49c24a7b46842

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.56.0-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.0-cp310-abi3-pyemscripten_2025_0_wasm32.whl.

File metadata

File hashes

Hashes for uharfbuzz-0.56.0-cp310-abi3-pyemscripten_2025_0_wasm32.whl
Algorithm Hash digest
SHA256 f3631cb67335d94318d7b9514f8d5d860a68780d523a188317ecf7861754a395
MD5 ea10941fdcedabaf5f9b2f64273a2e1e
BLAKE2b-256 14fb04a21974d722acaf389da834904f3635c23a23f377d07f81a58e1fb4eef4

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.56.0-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.0-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for uharfbuzz-0.56.0-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e3a80b0d94baf19be47708903246e2ff4bd1069e1f6bf9ed530bf1c9e3e476b4
MD5 b912a8756cd496fa3b9f108076861370
BLAKE2b-256 27b1a238405fcca1bab989b70adfe37182ba2d4394a8c2900037d3898e2a3dca

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.56.0-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.0-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for uharfbuzz-0.56.0-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 032382a82e3b9e2a460116aee2934bb713e4757efb68d7f11f55dbbb1ae57184
MD5 494001e6b1690b79e59b07e121d9c098
BLAKE2b-256 cd288a8f8d8d3513973d17cd83f057e2c85c6c813cb06b88245c9fe0242ecd1b

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.56.0-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.0-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.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3b4bb4398270bbb8e1005a7a3d56acd5258c5b00484a06633cb30776da9cc3ab
MD5 e34e7c9572b3326a2f5d133f56be0ea3
BLAKE2b-256 0c8f6541f3855ed2f592204363091276b0b19a00e6078d1a4ff9bbbdd5970021

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.56.0-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.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for uharfbuzz-0.56.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 beec7ae03ec5d0d130ca317795ff2ba24f75226a031c26a921e1706f8c59f36c
MD5 433d771be8613ca9e775202e1b0c77bc
BLAKE2b-256 3e50a13e8930633fc376882d01566dd23322ab5b4db5b8daf75dba535057061e

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.56.0-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.0-cp310-abi3-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for uharfbuzz-0.56.0-cp310-abi3-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 86ceb18ce68cef062224ed9919f4925624f4d8e33869e27fe1d8edef1eba83e1
MD5 e260743ab79f7a098ce44a3ef916a560
BLAKE2b-256 5e6de007fcdb9e11d5cac2c9d3ae8d260a57a3fd41eceffdf9c2624dc3909cb9

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.56.0-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