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
    x_offset = pos.x_offset
    y_offset = pos.y_offset
    print(f"{glyph_name} gid{gid}={cluster}@{x_advance},{y_offset}+{x_advance}")

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.3.tar.gz (1.7 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.3-pp311-pypy311_pp73-win_amd64.whl (1.2 MB view details)

Uploaded PyPyWindows x86-64

uharfbuzz-0.53.3-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.3-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.3-pp311-pypy311_pp73-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded PyPymacOS 11.0+ ARM64

uharfbuzz-0.53.3-pp311-pypy311_pp73-macosx_10_15_x86_64.whl (1.3 MB view details)

Uploaded PyPymacOS 10.15+ x86-64

uharfbuzz-0.53.3-cp310-abi3-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.10+Windows x86-64

uharfbuzz-0.53.3-cp310-abi3-win32.whl (999.1 kB view details)

Uploaded CPython 3.10+Windows x86

uharfbuzz-0.53.3-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.3-cp310-abi3-musllinux_1_2_aarch64.whl (2.7 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

uharfbuzz-0.53.3-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (1.7 MB view details)

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

uharfbuzz-0.53.3-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (1.6 MB view details)

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

uharfbuzz-0.53.3-cp310-abi3-macosx_10_9_universal2.whl (2.7 MB view details)

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

File details

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

File metadata

  • Download URL: uharfbuzz-0.53.3.tar.gz
  • Upload date:
  • Size: 1.7 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.3.tar.gz
Algorithm Hash digest
SHA256 9a87175c14d1361322ce2a3504e63c6b66062934a5edf47266aed5b33416806c
MD5 b8c414f5d44460fecd657ae3486f1bab
BLAKE2b-256 1c8d7c82298bfa5c96f018541661bc2ccdf90dfe397bb2724db46725bf495466

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.53.3-pp311-pypy311_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 063e9608999024e8c30f7e092aa92c83d28bf02c0d090c89f0de77854445d323
MD5 5ff493a18f289d9abbaf5faa61a4bd40
BLAKE2b-256 79b2a34cd621e79b9a58f8824fcb6b0dde638b335653acfc7276d47e579b1bbf

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.53.3-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.3-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.3-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9211d798b2921a99b8c34e810676137f66372d3b5447765b72d969bdfa6abe6a
MD5 71557eb904dde161d1b7926e3b81f507
BLAKE2b-256 f301a250521491bc995609275e0062c552b16f437a3ce15de83250176245093e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.53.3-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5d3a0b824811bd1be129356818e6cdbf0e4b056bb60aa9a5eb270bff9d21f24c
MD5 978010271b68d3fc23e94a7f231ce01e
BLAKE2b-256 aa2b04d8cde466acfe70373d4f489da5c6eab0aba07d50442dd21217cb0fd167

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.53.3-pp311-pypy311_pp73-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 757d9ed1841912e8f229319f335cf7dd25a2fd377e444bda9deb720617192e12
MD5 1c13e5ff2dad99e8081ed3d037e24ee4
BLAKE2b-256 709953e39bcd4dec5981eb70a6a76285a862c8a76b80cd52e8f40fe51adab032

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.53.3-pp311-pypy311_pp73-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 6f0ad2812303d2c7ccff596fd6c9d5629874f3a83f30255e11639c9b7ba4e89d
MD5 ce322b6eb2618dd721ed1efb3884e86d
BLAKE2b-256 e2d227be1201488323d0ff0c99fb966a0522b2736f79bd5a5b7b99526fca3d98

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: uharfbuzz-0.53.3-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.2 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.3-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 03aa2082a8f2840dabd9338dabea444cbd7ba249f1b64dae1a7c9378727c10f6
MD5 b5851d45316534ffc5de5583b3897d4d
BLAKE2b-256 540f56125440ae08a18daabd2e626f3a421dc54b6cf5e4cb35c13c827cc2a4a0

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: uharfbuzz-0.53.3-cp310-abi3-win32.whl
  • Upload date:
  • Size: 999.1 kB
  • 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.3-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 d861b0f7bdd247ec6f478ef5d20e7a2db0f01c57d8dd154cc66ad0ce2de6543f
MD5 f51d26f40eee5db5bb1f022e6dc2d772
BLAKE2b-256 05b85a18e3aa91c3c28c92fba3c544928a38583c9ec4efb953054fe27dc5d683

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.53.3-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 35ec3b600b3f63e7659792f9bd43e1ffb389d3d2aac8285f269d11efbe04787d
MD5 704fbcfbe312af844f925f42044c0ad4
BLAKE2b-256 ae4a63a81e9eef922b9f26bd948b518b73704d01a8d8e83324b2f99084ab7af0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.53.3-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 1191a74ddcf18ec721161b6b33a8ab31b0c6a2b15c6724a9b663127bf7f07d2e
MD5 91480c8f663f8617fa3768a9990d35d0
BLAKE2b-256 9ba0739471cdd52723ecc9fc80f36fb92c706a87265dc258521c1b14d99414f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.53.3-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.3-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.3-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 dca9a2e071c0c59ba8f382356f31a2518ac3dc7cc77e4f3519defc454c5b9a97
MD5 997042a92e2332543fa65a41e13c6328
BLAKE2b-256 30ff8e7cf78d525604f3e0a43b9468263fcf2acb5d208a3979c3bfa8dc61112d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.53.3-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 21d512c94aa992691aaf5b433deaca7e51f4ea54c68b99f535974073364f806f
MD5 d3de329dc4e1cc1e2f5dd447e56493d9
BLAKE2b-256 39c48b4b050e77d6cb9a84af509e5796734f0e687bd02ad11757a581bd6f197d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.53.3-cp310-abi3-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d977e41a501d9e8af3f2c329d75031037ee79634bc29ca3872e9115c44e67d25
MD5 bdeca7747e8b13de93e83baa93e00739
BLAKE2b-256 51885df9337adb60d7b1ad150b162bbc5c56d783d15546714085d92b9531f8f3

See more details on using hashes here.

Provenance

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