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.2.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.2-pp311-pypy311_pp73-win_amd64.whl (1.2 MB view details)

Uploaded PyPyWindows x86-64

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

Uploaded PyPymacOS 11.0+ ARM64

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

Uploaded PyPymacOS 10.15+ x86-64

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

Uploaded CPython 3.10+Windows x86-64

uharfbuzz-0.53.2-cp310-abi3-win32.whl (996.5 kB view details)

Uploaded CPython 3.10+Windows x86

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

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

uharfbuzz-0.53.2-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.2-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.2-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.2.tar.gz.

File metadata

  • Download URL: uharfbuzz-0.53.2.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.2.tar.gz
Algorithm Hash digest
SHA256 5151cbd986f080bbd2f4d531dbe9a03fb179cefb0fd864ba351aa522e58c9e23
MD5 6a49457a12687c8bd136609df9cf214a
BLAKE2b-256 64250323ac6cc4dc20c93d294d6deda891cd3b5d069309ed4256784a616c45bd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.53.2-pp311-pypy311_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 ca7fea0ceab920c18e14a49d6414c63ce1c98e7d575ecd7717cd226411da1e9d
MD5 3b9047482d2d6be8018855d1670a6dcb
BLAKE2b-256 3230b1399f400b74a1aeffbd6c2570e78d611ec205a7ebbdd5c8e247c0592c84

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.53.2-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.2-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.2-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f703dca534f0cdff1920e7c7f2e4338e9a4dc27b1ad2ccdbe93ebbdbe6e050b5
MD5 a71ad8ca043a2f3dc22a41dbe5645328
BLAKE2b-256 087df0df05341c5348fed011a5f991c4a78a6346c6f478f0026f9973d5667ecd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.53.2-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e9de020cede02533a71f8042120ca0b771a8a853e7e0118a5fb7dba3280117ae
MD5 b326be4b1b186f32368674cef74b31b4
BLAKE2b-256 32e9e5f648bb7d1e34d23a46070cbd7cf2492bdd09f29233d467fcfb684cf838

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.53.2-pp311-pypy311_pp73-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ff46f74084bfdebddb5573a52921d213087a1b8f7a826790ab8da78416e79e44
MD5 a5d319b34d0e71d43a8f7833d3a0502b
BLAKE2b-256 b3c4c81544da27418a3dfbf8a5346c8ec6efbb0a3b5485c2626624d71c9814af

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.53.2-pp311-pypy311_pp73-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 d7b0c695c480d19e72f33a8326a7e553ed6f657e49d140c05c76fa7b38fa32f9
MD5 08a9da0071170ddd2e265b436595a694
BLAKE2b-256 30340ed81abe167c8ac7660c2e71ef99d8b7a7b85cb849f6e49f7fdf470a2052

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: uharfbuzz-0.53.2-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.2-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 741134803e14cbece5fde6189fcd4d97ba817fd572b604a3b7f29eb2343e3d11
MD5 49ffcaf7576f2246d9c816263fa3fdeb
BLAKE2b-256 a7a4eb61d2007531634589cce9ee9928c6b6514b8aba01c79cd9b9cbbeff42a7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: uharfbuzz-0.53.2-cp310-abi3-win32.whl
  • Upload date:
  • Size: 996.5 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.2-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 8b6a12c50bd94e1a2e9bbf04a737299a76b5ebedcba4c2bf4494233d5b298748
MD5 ce314cd2a6b8d75acd4f534381fbd5b6
BLAKE2b-256 370b903fc46bd2407baf1cf4c922450f843c293c7b0dab90e7e190be502837e2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.53.2-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b1b0dee5060df82e2c09130bbef1e80979ce6b26dcfe6f5d9b9a77bc0ed4d8da
MD5 a7a2d471a587a8bd88c2b26d86f16bc2
BLAKE2b-256 ce3d104d1ba2c0e535a0d9744e0a68f711d022c46ec7c7000f35eefd574ba197

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.53.2-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 e58af854612a9536cff7f440a520873e44cafba501245f473f90d4fb8a7da31d
MD5 cd4b9786e6edd56d304b9604455b7735
BLAKE2b-256 0e263cbab4c18419103398904317c1e80115cfc28a82a0c1e5e05593a39de3c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for uharfbuzz-0.53.2-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.2-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.2-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e9c211a0f576b145abdea67391847cc8e490ed7cfbd2b26e85d3d8035b1e3f60
MD5 f2cc6d9dba3551facfe392cf7559e2d1
BLAKE2b-256 6dba58551ae2ff695360b8e7922f82fa4ce3951cf31e6172039cccc37f87436f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.53.2-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 7f5c65204de46425f58e5b5a6892e7eba3cbcc7dba2c55d95760ba3356a1a546
MD5 0afdd7a11113563a126f03a329367642
BLAKE2b-256 81d1999fde3cced5abdb21a99bdc66e9a430957d7b86aaf06acaf7f76f530a22

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for uharfbuzz-0.53.2-cp310-abi3-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 56d0ceb8af633035b37e9bb8bd642a657eba64cb99636058075d40ad8188758f
MD5 1a286996f07af771d23b438a504101f7
BLAKE2b-256 41721e19d87f3ba246cbc88dbd60d03e4cbac8df3aad5d84d22cf32fc2a50e79

See more details on using hashes here.

Provenance

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