Skip to main content

Streamlined Cython bindings for the harfbuzz shaping engine

Project description

Travis Build Status Appveyor Build status PyPI

uharfbuzz

Streamlined Cython bindings for the HarfBuzz shaping engine.

Example

import uharfbuzz as hb
import sys


with open(sys.argv[1], 'rb') as fontfile:
    fontdata = fontfile.read()

text = sys.argv[2]

face = hb.Face(fontdata)
font = hb.Font(face)
upem = face.upem

font.scale = (upem, upem)
hb.ot_font_set_funcs(font)

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

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.7.0.zip (28.3 kB view details)

Uploaded Source

Built Distributions

uharfbuzz-0.7.0-cp38-cp38-win_amd64.whl (305.1 kB view details)

Uploaded CPython 3.8 Windows x86-64

uharfbuzz-0.7.0-cp38-cp38-win32.whl (264.6 kB view details)

Uploaded CPython 3.8 Windows x86

uharfbuzz-0.7.0-cp38-cp38-manylinux2010_x86_64.whl (487.1 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

uharfbuzz-0.7.0-cp38-cp38-manylinux1_x86_64.whl (487.1 kB view details)

Uploaded CPython 3.8

uharfbuzz-0.7.0-cp38-cp38-macosx_10_9_x86_64.whl (468.6 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

uharfbuzz-0.7.0-cp37-cp37m-win_amd64.whl (304.7 kB view details)

Uploaded CPython 3.7m Windows x86-64

uharfbuzz-0.7.0-cp37-cp37m-win32.whl (264.1 kB view details)

Uploaded CPython 3.7m Windows x86

uharfbuzz-0.7.0-cp37-cp37m-manylinux2010_x86_64.whl (486.1 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

uharfbuzz-0.7.0-cp37-cp37m-manylinux1_x86_64.whl (486.0 kB view details)

Uploaded CPython 3.7m

uharfbuzz-0.7.0-cp37-cp37m-macosx_10_9_x86_64.whl (467.9 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

uharfbuzz-0.7.0-cp36-cp36m-win_amd64.whl (304.6 kB view details)

Uploaded CPython 3.6m Windows x86-64

uharfbuzz-0.7.0-cp36-cp36m-win32.whl (264.1 kB view details)

Uploaded CPython 3.6m Windows x86

uharfbuzz-0.7.0-cp36-cp36m-manylinux2010_x86_64.whl (485.9 kB view details)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

uharfbuzz-0.7.0-cp36-cp36m-manylinux1_x86_64.whl (485.9 kB view details)

Uploaded CPython 3.6m

uharfbuzz-0.7.0-cp36-cp36m-macosx_10_9_x86_64.whl (468.6 kB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

File details

Details for the file uharfbuzz-0.7.0.zip.

File metadata

  • Download URL: uharfbuzz-0.7.0.zip
  • Upload date:
  • Size: 28.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/2.7.17

File hashes

Hashes for uharfbuzz-0.7.0.zip
Algorithm Hash digest
SHA256 030dd4c62bf6130d72932cb3f91596d4855f03ef904b3176476a63b05e4ff5f2
MD5 bcdef39c48a9383d4a53c6d4b4a13f39
BLAKE2b-256 7fb4031fd55f35ad62934b9f86eef68ca8fced6967b5b300a59dae128898acca

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.7.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: uharfbuzz-0.7.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 305.1 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5

File hashes

Hashes for uharfbuzz-0.7.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 1818b6c0714cb6fc80711dc3bd98b3114c62c2b8632e84d1cc4aa20f25714faa
MD5 bc509e3c9c825e527e3613b6e5e6bcba
BLAKE2b-256 4a001da58ec541284d60a3fac3f2f9f365526deea10229c35870aff2bc262a5a

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.7.0-cp38-cp38-win32.whl.

File metadata

  • Download URL: uharfbuzz-0.7.0-cp38-cp38-win32.whl
  • Upload date:
  • Size: 264.6 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5

File hashes

Hashes for uharfbuzz-0.7.0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 302152142aaf0e5348362b6eeb1f8d8e0175543f6082f04bf6ef0a831b82aa59
MD5 313e664f3a8c4e63fcd61d9ecadde745
BLAKE2b-256 0aed084e4d282ebbc19c92c802c100f0da7f154d31af999aac24e64bbce3afdc

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.7.0-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

  • Download URL: uharfbuzz-0.7.0-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 487.1 kB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.7

File hashes

Hashes for uharfbuzz-0.7.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 b507a796d84c60fe789a096e60d6ed401ea0da6ce5abc98fa131ff70c72cffcd
MD5 667c50f6e5ea3d4f78cdc132d3d176e5
BLAKE2b-256 122c2b5ec7c1e0c7e326f4f9a2a9688e5cb5a9d6cd8fd8c28d246cd83f1404c8

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.7.0-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: uharfbuzz-0.7.0-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 487.1 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.7

File hashes

Hashes for uharfbuzz-0.7.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a63d7a4e7da195c8e10b5a46495b8d5ec8aeb703205c539569813928eedc2bc3
MD5 fb9412131f297e37470a93660bd0316f
BLAKE2b-256 79037f3f480e35547da1b824ca6e56b63c9e403d2c1835c23984428ee80d888d

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.7.0-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: uharfbuzz-0.7.0-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 468.6 kB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/2.7.17

File hashes

Hashes for uharfbuzz-0.7.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ff6d832033e435602b8fac99fd343a9c98eb33fd925766e0a07734d1da1aa8c5
MD5 bc45da685b0fd3448fc8b8c585de8ec2
BLAKE2b-256 16c019617f3c1bc9ee13335f9744a0bc1eb2de290a43458905ecaca43f9cc05a

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.7.0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: uharfbuzz-0.7.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 304.7 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5

File hashes

Hashes for uharfbuzz-0.7.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 c31da3a6e6c5c477cbdd42815907058414b58b0dddd245e2d50fafd92209aa4a
MD5 5b7b9ccf173d388a1d313c5ade9b1137
BLAKE2b-256 c23468452a256dacf8441a4ba63ad31482a687ad3801877e1d855151ad860d9f

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.7.0-cp37-cp37m-win32.whl.

File metadata

  • Download URL: uharfbuzz-0.7.0-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 264.1 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5

File hashes

Hashes for uharfbuzz-0.7.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 7bb7ab5851f43e891cfabf6b526ae34681a74091ed0d34a649b20315653e213e
MD5 768143ca0d89e08648261d0d34e18f21
BLAKE2b-256 040b9aa4e62a0dac420b9bef37179d0f2daaa81b6038203391578a83c0129f6e

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.7.0-cp37-cp37m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: uharfbuzz-0.7.0-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 486.1 kB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.7

File hashes

Hashes for uharfbuzz-0.7.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 c264bc7f11126655daa9d9eaf0c1568a0217d6f63f193c0525e59012f06c08a9
MD5 9a85c395adeb956994338ebdeb138ee8
BLAKE2b-256 c63157183e30917c7f803f6ca8a8bffb9b2636fac3f48c13e27f7d6a545104c9

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.7.0-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: uharfbuzz-0.7.0-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 486.0 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.7

File hashes

Hashes for uharfbuzz-0.7.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 fba6dfd2588b5447953019e5539c52635e727b35cefd60d4edbda61d64d8c374
MD5 d5d306de5377cc73dbe3efd3b1803e8f
BLAKE2b-256 9172f6ac9a829eb9e77f66c54311c102a97af391cab04d3d9455242890003a46

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.7.0-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: uharfbuzz-0.7.0-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 467.9 kB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/2.7.17

File hashes

Hashes for uharfbuzz-0.7.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e718f279536bc241e994da2b0827f71faa36e57daaad306eb830ac52d8d1063f
MD5 24a96dabf3659c39979d94bca7370480
BLAKE2b-256 39dc6d01157022dbd5769416466abceed0c1ad8c5e8e325e38c00787d46dfac4

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.7.0-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: uharfbuzz-0.7.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 304.6 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5

File hashes

Hashes for uharfbuzz-0.7.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 f55de4c50620da8f25c9b6dd90c07646db4d0db96ef0e6b7144da1040b8c93d9
MD5 9867b0750144282136c2f440302da905
BLAKE2b-256 b82b0545a0afde92d9868ed9faa281a1e1a996e1912138f0b89526ea06639622

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.7.0-cp36-cp36m-win32.whl.

File metadata

  • Download URL: uharfbuzz-0.7.0-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 264.1 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5

File hashes

Hashes for uharfbuzz-0.7.0-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 f4d7e248a31cd575921bb39fe842156fc290ba43fd87533a1661e79fe9529e54
MD5 d1dd1cb86f2a1be3d0a889d6b0d3ad7b
BLAKE2b-256 b0854e14b19cec28ede47f48fe46c35b3392176868ab2050a2fbba35c241cde7

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.7.0-cp36-cp36m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: uharfbuzz-0.7.0-cp36-cp36m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 485.9 kB
  • Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.7

File hashes

Hashes for uharfbuzz-0.7.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 857043f3d9dc4861c41f46014297c3703ae4c569d8fe141f3be5c9db8e6a435d
MD5 60fee10032883549f736f16aedcf8e2f
BLAKE2b-256 5b10424ac38e6ebe8e62e3e13d4de6d8d4aebd703d4da042f2cdc70c5fb150a1

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.7.0-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: uharfbuzz-0.7.0-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 485.9 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.7

File hashes

Hashes for uharfbuzz-0.7.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 8b175371ff0eec1fc919861d75f4dccfeb0c942334afd4e5a36fe0389a4c2e28
MD5 dc1d17602691d87240501f1065d8dc3c
BLAKE2b-256 386b1f6a6e1b07c90eccc3a928215decd126e7b7fd19f411f912b44ac141bbfd

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.7.0-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: uharfbuzz-0.7.0-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 468.6 kB
  • Tags: CPython 3.6m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/2.7.17

File hashes

Hashes for uharfbuzz-0.7.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6af62321ab1b7c74dddfa42c18a6481f3421657cf3e37c4ee2c17e097fb6f377
MD5 2bd48c0b455b80d74489273c427d8058
BLAKE2b-256 d08a546f0d1d1ef4197a2a9df4efa0e00c8960d853df0a74230284b9383c40fe

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page