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


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

Uploaded PyPyWindows x86-64

uharfbuzz-0.53.6-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (1.6 MB view details)

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

uharfbuzz-0.53.6-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (1.5 MB view details)

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

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

Uploaded PyPymacOS 11.0+ ARM64

uharfbuzz-0.53.6-pp311-pypy311_pp73-macosx_10_15_x86_64.whl (1.4 MB view details)

Uploaded PyPymacOS 10.15+ x86-64

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

Uploaded CPython 3.10+Windows x86-64

uharfbuzz-0.53.6-cp310-abi3-win32.whl (1.0 MB view details)

Uploaded CPython 3.10+Windows x86

uharfbuzz-0.53.6-cp310-abi3-musllinux_1_2_x86_64.whl (2.8 MB view details)

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

uharfbuzz-0.53.6-cp310-abi3-musllinux_1_2_aarch64.whl (2.7 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

uharfbuzz-0.53.6-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.53.6-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (1.7 MB view details)

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

uharfbuzz-0.53.6-cp310-abi3-macosx_10_9_universal2.whl (2.9 MB view details)

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

File details

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

File metadata

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

File hashes

Hashes for uharfbuzz-0.53.6.tar.gz
Algorithm Hash digest
SHA256 d5bbf33ea5bcb0bfda5436e2ada91b39d4a63cc29fa81022932209aafefba28e
MD5 2aab1e597f9b1ea55ef7205b65c1856f
BLAKE2b-256 4ac225b61744d726809f313070d0e2b83ae1c80f891072b341b6926bc048d9a3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.53.6-pp311-pypy311_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 9f7684ec92d9f37487037ca49b44102ab48c2f9ce0587e5c8919ccc6e82790b1
MD5 4c471b4dbcdc3464f1fbc7dcea449d1f
BLAKE2b-256 206ec62278df0294588103666537219f80e5556d252b3a4b2024390cc5be8664

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.53.6-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.53.6-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.53.6-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3ec7152bf9b3af460dd869ee05d5c1b0dcd8dc5012b9311fe0fb8b028dc2fb6e
MD5 21c3707b61ae40f18164d0eeef4ff0f0
BLAKE2b-256 7b0ffefbed6baee6649f8a3b873c96a16f2c83bdf0e3aa6961b9e99fd8dc7ba7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.53.6-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b7810afaa2b72b78b6e7e325d345ebc4ee76228c3b87a7c21b6b81146f69bf2e
MD5 807f1ebbef1e3f0d9158827fc4579819
BLAKE2b-256 fa4575006b696409c281013eaf9ff688245e62d9d9b6bfa9af263ecedb5948b3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.53.6-pp311-pypy311_pp73-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b2eac5e853db2d84cb689fe6de3724a4209c4067fbfe05cb6133db7cf2c4742a
MD5 d36cd354d00116b8eddd4f3f9d7c0dfb
BLAKE2b-256 72a46483ddf9aaf3948e6221bf7815aee860f9cd2a72a76529968c9d77094138

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.53.6-pp311-pypy311_pp73-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 fef16a863ac2cf117a726799d9e023c3ded2e1cefd2b6b835207105cb871b472
MD5 05137a0b3bea839f7412d9462cb1be7d
BLAKE2b-256 f0efd10b7566de148b5d2091f3248efc3064b248a90e1da895a153496aebbc9e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: uharfbuzz-0.53.6-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.7

File hashes

Hashes for uharfbuzz-0.53.6-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 280b81243170808883dde8316f31178a22a7b48eea3d1261738c60bed458f30f
MD5 547fa8452eb6cdafe2eb102e75a91489
BLAKE2b-256 6c5c8a43fd674f69123e0b00884f16336f66bf9901a0e46bbb9cda74beca242d

See more details on using hashes here.

Provenance

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

File metadata

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

File hashes

Hashes for uharfbuzz-0.53.6-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 b220c9897bdda782fc3fe05529bc47e22c174ae5d831e05cc8936596647c096c
MD5 2aca6306cd2d8a31e9e429a9752701b9
BLAKE2b-256 f115a79ceecec8fcd851815eb7c8e2af52209ffce2c1f11424402a67f12970c3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.53.6-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 4cbd6008f67323039cfc50c4b72c66385a5ccb130718ab3ddbbcfd815c9e5b81
MD5 d7a4321c6d2fcc0162e520250ee69f23
BLAKE2b-256 d9ee00aea6a1bf0a0e27a3b83fb4fcf7fa2e83ee31c6285396ffa770ff2c16b2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.53.6-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 6e2862eae8a84d097e0dee02370783ad261f31fdcb033705469517a575b32fc8
MD5 229f184f78ff1cea04df22dbcc8a17c7
BLAKE2b-256 522f928489fbaafce87d667ed2527ab63b51c4a3d7d5a19bf2cd540a5e22f208

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.53.6-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 da9ad8d601c6d8da54197b64a29dbb2748204487684e001e6aabc87065b81cb4
MD5 2a71338833292921c92c8b649fe79651
BLAKE2b-256 c36bb2210f4ee295b4628c7ce2f86f67be919bfb7b061a46dad067b180c87786

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.53.6-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 c8c9d2b20b19a0423b39dba248faf76cba3f2a9523dc2bccbbbd453681e27f99
MD5 87f13e5bf152c7c23bb0f6404c3d8627
BLAKE2b-256 7bc87a96058049cabebdcb23a368634cf0be0ff74c841be999e965121dfd4f66

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.53.6-cp310-abi3-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 11b5563a1c2dd49b012bfa73a7b78791c1d51ebe7b744c506909608b185a096a
MD5 38cc446ce70b13c9bbb1bd6f81cdc7fc
BLAKE2b-256 c0be4a0c5ad19576f1cec6a211d8bcb93a7812c8be6a7fe30d25d8148edb03e7

See more details on using hashes here.

Provenance

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