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.54.1.tar.gz (1.9 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.54.1-pp311-pypy311_pp73-win_amd64.whl (1.3 MB view details)

Uploaded PyPyWindows x86-64

uharfbuzz-0.54.1-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.54.1-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.54.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded PyPymacOS 11.0+ ARM64

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

Uploaded PyPymacOS 10.15+ x86-64

uharfbuzz-0.54.1-cp310-abi3-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.10+Windows x86-64

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

Uploaded CPython 3.10+Windows x86

uharfbuzz-0.54.1-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.54.1-cp310-abi3-musllinux_1_2_aarch64.whl (2.8 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

uharfbuzz-0.54.1-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (1.8 MB view details)

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

uharfbuzz-0.54.1-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.54.1-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.54.1.tar.gz.

File metadata

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

File hashes

Hashes for uharfbuzz-0.54.1.tar.gz
Algorithm Hash digest
SHA256 ded760c284c686f1f17f5c4bf44527857ef488b7f0aebceae4c1ef1903ddddb3
MD5 2559c570a4eb391c53336d683f0e4377
BLAKE2b-256 04cff46264008f4f654f823c6a61e02556a4ca2ca04ac28df951a7ed7d11aa52

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.54.1-pp311-pypy311_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 5863c255a380e860cbc2a35d6ac8a26b518de42210f6186010e6277afdf4b5ce
MD5 ccfc6a9570a2832def3f02ea930c807a
BLAKE2b-256 56d0f47fd04ce8fc980d2dce5979b0595d80f284448ccd47780c426609f951a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.54.1-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.54.1-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.54.1-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 918ebca8fecc89d0e9f9df71e9e5ef5cede5f2bc571a9e82a3e932f4189ac432
MD5 7f7378d08a2a700f5bb68c33e82bd5b7
BLAKE2b-256 491cf59f22c5e1237965165fe424195198770c05b5b22766acec165fa9fcad56

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.54.1-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 55342a09f8a0bfbf570e4765cd3b02b1a999822127f891d944cbb0c26dc2090a
MD5 d0295b04fdbd10798cf095ab60d9515e
BLAKE2b-256 9fc364189774b5d6468e4d844e71c09cc9f9ac990a39c5b008858869d6521195

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.54.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8c81285dabaa2150a34f18062cdb13eb443a8db0a1e59b261be8644fd1732301
MD5 6a4c3f3949e9ec336588d58977b6c56e
BLAKE2b-256 ff0295d25586ceb8ff8dcf38c0c1ed6bfd5bb9c2165dda060ed46a907faca6ef

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.54.1-pp311-pypy311_pp73-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 9c44559b52899dbbf3db3d49ac0372db78255ae5b2cbc2b1d2eb50fdb197f28c
MD5 c27867c8bd252a460eb56e7c604325aa
BLAKE2b-256 b268362df7801a3f634938dc51af91231c391c4ba9513e2fbb6ed4a00ac63894

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: uharfbuzz-0.54.1-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.3 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.54.1-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 94dc73f45d8943ddeaae3336cd40c0f398397ca915db1fc96dd5566107dbb6f2
MD5 abd5f0d9d402619d9687f79510a58007
BLAKE2b-256 ac8adc83b840d7f6b43255cb5f4ee9ae369b6e4c67b11226c6be6af80faf4bc9

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: uharfbuzz-0.54.1-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.54.1-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 9d859baa4df2bba238458c47d5dd58a66b16d135777457d05d4f447e15670d70
MD5 558ddac1445e197fda6e528e98ca3e8f
BLAKE2b-256 2b81cd40cf2fa27029354947f4b27e62cc9edc9ba9c94fcd2de3b21e0aac4b9b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.54.1-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 fe6b06bfc6f223cbee6a42018ede4161e0c1020f2b8e22b245530b77bcbd9cd7
MD5 ab6cb3d6738927e242babe38fe0c7147
BLAKE2b-256 c4b376bc2c44346a65c3316fa473bf4d64e642e9f0b77d53a3fc675b13b639b8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.54.1-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 bca97e4a5b288297473128869cbd1bb0f6e4619caa8a248f66986da3e21c1773
MD5 a5de8c0d14a5bd8070ad8bfe268640e8
BLAKE2b-256 d22f575c9df77090aa068b8002d6cfd1027897fc887eb2eb85dbee991440f2f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.54.1-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.54.1-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for uharfbuzz-0.54.1-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1059de9a7764611c214bff4fd0ed81526dbde024b11dc697dfca0bc590ebaf15
MD5 b69718a95f2e630d6876fa88f13ab10d
BLAKE2b-256 7b0c538e1dc6194418df025e237f74df279b0b27c9ec498aeda6a4b2082ca4f4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.54.1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 d3fee855690c6059fb9b5fc64a3ea0e367b5f71095b2e62e18ce144e9e782b47
MD5 9b112c6a5ccb49a83a80bcf2d9c1a1b5
BLAKE2b-256 ceaa41e3e71a25c6db6b32774fb09b43dd8b7bf44f2273bad6250eb5658c0cd5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.54.1-cp310-abi3-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ddc0ef83d51985c63f50f11781ca2f36c0bc8b9f9d6bd6bb00f4860ae0814700
MD5 4cf4c4ce5f817d56bf7b1cce184361d2
BLAKE2b-256 873c4bcd6c360808c0d5a9e3970dd0a50a2eeac2610974ea71974c576699fc42

See more details on using hashes here.

Provenance

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