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.5.1.post2.zip (26.3 kB view details)

Uploaded Source

Built Distributions

uharfbuzz-0.5.1.post2-cp38-cp38-win_amd64.whl (297.6 kB view details)

Uploaded CPython 3.8 Windows x86-64

uharfbuzz-0.5.1.post2-cp38-cp38-win32.whl (258.1 kB view details)

Uploaded CPython 3.8 Windows x86

uharfbuzz-0.5.1.post2-cp38-cp38-manylinux2010_x86_64.whl (478.4 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

uharfbuzz-0.5.1.post2-cp38-cp38-manylinux1_x86_64.whl (478.4 kB view details)

Uploaded CPython 3.8

uharfbuzz-0.5.1.post2-cp38-cp38-macosx_10_9_x86_64.whl (462.6 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

uharfbuzz-0.5.1.post2-cp37-cp37m-win_amd64.whl (297.2 kB view details)

Uploaded CPython 3.7m Windows x86-64

uharfbuzz-0.5.1.post2-cp37-cp37m-win32.whl (257.4 kB view details)

Uploaded CPython 3.7m Windows x86

uharfbuzz-0.5.1.post2-cp37-cp37m-manylinux2010_x86_64.whl (477.5 kB view details)

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

uharfbuzz-0.5.1.post2-cp37-cp37m-manylinux1_x86_64.whl (477.5 kB view details)

Uploaded CPython 3.7m

uharfbuzz-0.5.1.post2-cp37-cp37m-macosx_10_9_x86_64.whl (461.8 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

uharfbuzz-0.5.1.post2-cp36-cp36m-win_amd64.whl (297.1 kB view details)

Uploaded CPython 3.6m Windows x86-64

uharfbuzz-0.5.1.post2-cp36-cp36m-win32.whl (257.5 kB view details)

Uploaded CPython 3.6m Windows x86

uharfbuzz-0.5.1.post2-cp36-cp36m-manylinux2010_x86_64.whl (477.8 kB view details)

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

uharfbuzz-0.5.1.post2-cp36-cp36m-manylinux1_x86_64.whl (477.8 kB view details)

Uploaded CPython 3.6m

uharfbuzz-0.5.1.post2-cp36-cp36m-macosx_10_9_x86_64.whl (462.5 kB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

File details

Details for the file uharfbuzz-0.5.1.post2.zip.

File metadata

  • Download URL: uharfbuzz-0.5.1.post2.zip
  • Upload date:
  • Size: 26.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/2.7.17

File hashes

Hashes for uharfbuzz-0.5.1.post2.zip
Algorithm Hash digest
SHA256 6877f52ee98e0e8036e9f5485acd0c6a1e4656d813615d792eb5ab4062980cdd
MD5 8c15310f6bb2075a4a25f94f8912fa8b
BLAKE2b-256 2821458c3ca9a1c546e0de15d5cb8825a48b65ea752c84ca58e3dee0efac6882

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.5.1.post2-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: uharfbuzz-0.5.1.post2-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 297.6 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.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5

File hashes

Hashes for uharfbuzz-0.5.1.post2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 40e657e1eaefcec86224c238cf171f139242757ffe16330794eb51f91597d3a0
MD5 ddb623d26fc8c1d8eda473cace779cbf
BLAKE2b-256 0ddd520d07fefaa4be5bd9ae9d3d10d0a11a9ceff5f23f004a96e9817d14c751

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.5.1.post2-cp38-cp38-win32.whl.

File metadata

  • Download URL: uharfbuzz-0.5.1.post2-cp38-cp38-win32.whl
  • Upload date:
  • Size: 258.1 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.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5

File hashes

Hashes for uharfbuzz-0.5.1.post2-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 056a2865c4ace8dd0d5885903fefc6ddf1621457b8e54d6f461d49f54ba041d1
MD5 b537c3ada3b3fabf8e760f2d1e2e2751
BLAKE2b-256 a689f7329678e2e63936ac57554762eab7b66d97fe9c4c53363e87c7f0eb3f85

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.5.1.post2-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

  • Download URL: uharfbuzz-0.5.1.post2-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 478.4 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.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.7

File hashes

Hashes for uharfbuzz-0.5.1.post2-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 9e6ba7a66ffd66505eeef7338aca7dacb77ef1f1c01d5028ab364201ec2b9991
MD5 4f80807a870d3f1bcbd5fff3dac6619b
BLAKE2b-256 b571b33f920829329875132569955013a8e8f515ef79fe7ae248307903c62b25

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.5.1.post2-cp38-cp38-manylinux1_x86_64.whl.

File metadata

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

File hashes

Hashes for uharfbuzz-0.5.1.post2-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 5497ee6c58efcdaac137f5ef4a1ce9abfdedc2e329557de6ca8cc88f5daf30f0
MD5 dd04057f7d0deaa117b568a405184774
BLAKE2b-256 e462c1320161c91fd3901817f91733b1371026920d2db07a9518f008f9543600

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.5.1.post2-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: uharfbuzz-0.5.1.post2-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 462.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.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/2.7.17

File hashes

Hashes for uharfbuzz-0.5.1.post2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4a0a7c69bef967323d6359dfe7dbaa4ed84915aceedb3240b4d36a0514035c16
MD5 6d2af206a33a8d51ddfca05e5be9bebb
BLAKE2b-256 a004712970d04ae695b8245b143b9b2101caa3569456c0b594cff0debd038d2f

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.5.1.post2-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: uharfbuzz-0.5.1.post2-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 297.2 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.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5

File hashes

Hashes for uharfbuzz-0.5.1.post2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 c5b9c5b56431a5b1425f6f274b39b32be891a2155f3b1f6f65ccdd7d5be28944
MD5 4992018d95486b65c1fc2b4f07d74580
BLAKE2b-256 78377cb8ac9b878d4177dd8483676eabec53d75beba2b7c83cc3c6bc347ef8ce

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.5.1.post2-cp37-cp37m-win32.whl.

File metadata

  • Download URL: uharfbuzz-0.5.1.post2-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 257.4 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.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5

File hashes

Hashes for uharfbuzz-0.5.1.post2-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 132381f35edd0863b78d7fa0fcf3c7bf3f3c7c5a7730687fb53c6b8fc7b7e23b
MD5 1d3b59ae3317853d1d12e46df2052a9d
BLAKE2b-256 3978d13c940525b357edecd941ea0299fb758b6a73ccf6c5b027bd71fa2a0063

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.5.1.post2-cp37-cp37m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: uharfbuzz-0.5.1.post2-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 477.5 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.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.7

File hashes

Hashes for uharfbuzz-0.5.1.post2-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 10fcddb4aff88abbe3de7bf858ccb05281731705db08b1b66b64cdbe02ac24f8
MD5 69c7fc12404d66df5bb11cd3411f4cea
BLAKE2b-256 968cb92296a5c710cacf8fabab3567686329a0800a674599ffc57889b1965baa

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.5.1.post2-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

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

File hashes

Hashes for uharfbuzz-0.5.1.post2-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 9eea69d70e79850cd0cacdce40af2a81c870bbcaad4918b2a02baad1f7e6dc43
MD5 e3a630da6221e976d8ebed2f5159f508
BLAKE2b-256 3e529416314f30c62730f58d3e8a041aafadf3114d4fc420bac9d04e6e53d250

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.5.1.post2-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: uharfbuzz-0.5.1.post2-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 461.8 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.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/2.7.17

File hashes

Hashes for uharfbuzz-0.5.1.post2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9b41d72a328c92c6e5aa083805ba21db53531dd4d9003a24e089fd312425c2fe
MD5 bf665cd9eac945ae3623fd595020cbcc
BLAKE2b-256 ab8ad5e35a328e735f27bf45c898cdb3ca8e0d07d5648c9de561472e4c780142

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.5.1.post2-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: uharfbuzz-0.5.1.post2-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 297.1 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.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5

File hashes

Hashes for uharfbuzz-0.5.1.post2-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 ab6250db81b7d468818be53d3fda4161aca3ced0cff4c15ee1f125378661a840
MD5 78a2a51ba4b8c9a657ec9a453747fc03
BLAKE2b-256 9fd372e2ac8159a4e3e965f608164e1b51b3ebb65ddffb292388500c5a6196cc

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.5.1.post2-cp36-cp36m-win32.whl.

File metadata

  • Download URL: uharfbuzz-0.5.1.post2-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 257.5 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.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5

File hashes

Hashes for uharfbuzz-0.5.1.post2-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 2bb598a2c540c08184ee3363f19889d5f52d4db425a8cbd671b896db1cfb6382
MD5 9635ed973dc475d1194e8e8f2189d64a
BLAKE2b-256 e5c91f514639ea85def29200341d74424c8a504ffaceb8952b3b19342cd04c11

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.5.1.post2-cp36-cp36m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: uharfbuzz-0.5.1.post2-cp36-cp36m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 477.8 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.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.7

File hashes

Hashes for uharfbuzz-0.5.1.post2-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 a82b5d84830c3df71c65d76d15021047ec702964de3a701d4d7819153621213b
MD5 250cc8a4031fe7696ffc343cf9cd2fcf
BLAKE2b-256 1f9694f48e4ae501dc6d279e42e67d74e7de67ec2b5943c54e1b47f486583466

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.5.1.post2-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

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

File hashes

Hashes for uharfbuzz-0.5.1.post2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 d230a7c7179954f870fca9e509c953e063f4378107b24657b6f7827b71386b54
MD5 a49413c6ceef7159c621938eb66a071c
BLAKE2b-256 55157db8d70e258cb287d3ebff845099e2bacd47f41e5516c3042566f360c381

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.5.1.post2-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: uharfbuzz-0.5.1.post2-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 462.5 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.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/2.7.17

File hashes

Hashes for uharfbuzz-0.5.1.post2-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6446ffea005538a13ce8749f45a684b445fe35eae98448c9b6b01d06f5451df3
MD5 4469f841037b538aaa8bc45546bf066b
BLAKE2b-256 97a469bcc667ce05d769a7fcd79192aaea3fd2032e91b16c1b23b8adb6d6ff4f

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