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.14.0.zip (1.1 MB view details)

Uploaded Source

Built Distributions

uharfbuzz-0.14.0-cp38-cp38-win_amd64.whl (392.9 kB view details)

Uploaded CPython 3.8 Windows x86-64

uharfbuzz-0.14.0-cp38-cp38-win32.whl (337.9 kB view details)

Uploaded CPython 3.8 Windows x86

uharfbuzz-0.14.0-cp38-cp38-manylinux2010_x86_64.whl (4.7 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

uharfbuzz-0.14.0-cp38-cp38-manylinux1_x86_64.whl (4.7 MB view details)

Uploaded CPython 3.8

uharfbuzz-0.14.0-cp38-cp38-macosx_10_9_x86_64.whl (554.8 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

uharfbuzz-0.14.0-cp37-cp37m-win_amd64.whl (390.0 kB view details)

Uploaded CPython 3.7m Windows x86-64

uharfbuzz-0.14.0-cp37-cp37m-win32.whl (336.0 kB view details)

Uploaded CPython 3.7m Windows x86

uharfbuzz-0.14.0-cp37-cp37m-manylinux2010_x86_64.whl (4.6 MB view details)

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

uharfbuzz-0.14.0-cp37-cp37m-manylinux1_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.7m

uharfbuzz-0.14.0-cp37-cp37m-macosx_10_6_intel.whl (1.1 MB view details)

Uploaded CPython 3.7m macOS 10.6+ intel

uharfbuzz-0.14.0-cp36-cp36m-win_amd64.whl (390.2 kB view details)

Uploaded CPython 3.6m Windows x86-64

uharfbuzz-0.14.0-cp36-cp36m-win32.whl (336.2 kB view details)

Uploaded CPython 3.6m Windows x86

uharfbuzz-0.14.0-cp36-cp36m-manylinux2010_x86_64.whl (4.6 MB view details)

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

uharfbuzz-0.14.0-cp36-cp36m-manylinux1_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.6m

uharfbuzz-0.14.0-cp36-cp36m-macosx_10_6_intel.whl (1.1 MB view details)

Uploaded CPython 3.6m macOS 10.6+ intel

File details

Details for the file uharfbuzz-0.14.0.zip.

File metadata

  • Download URL: uharfbuzz-0.14.0.zip
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/2.7.17

File hashes

Hashes for uharfbuzz-0.14.0.zip
Algorithm Hash digest
SHA256 965d79ec2d884937431cc627ce87a32052073a92a10ebd7224a707a8084388c5
MD5 08f379ab9fa5c4df59ef8c9899530fbd
BLAKE2b-256 31a53201367305d53f58dc6adc03623c71ad5a7fb308eaef32a891457194d2ad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uharfbuzz-0.14.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 392.9 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.5

File hashes

Hashes for uharfbuzz-0.14.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 8ed530cc60a2689f9dba642be2e5dc5e1e7efce7cfb3da85178abd37d25a51fe
MD5 1ea22ad3bccdff29c4dd2717f0a4971a
BLAKE2b-256 3a2d572cb8d36f7c33a42cb0282d0bcaa7369bdb6a7eff9fd6a0c52ad6b71f5f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uharfbuzz-0.14.0-cp38-cp38-win32.whl
  • Upload date:
  • Size: 337.9 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.5

File hashes

Hashes for uharfbuzz-0.14.0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 610d3b1cf4266a09c840864630fb81863caf7d28f2947b753011966ea64917d4
MD5 0c8c2e7c9c91a03e86fe2bca51799e57
BLAKE2b-256 8603cb0a3672b957e9900ab49ecd20955dcdff54b4371c53c4e2995dabcfc28e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uharfbuzz-0.14.0-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 4.7 MB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.6.7

File hashes

Hashes for uharfbuzz-0.14.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 1ca88dd044d82f91b320e16c634f642fac7ffdf3916b3663bc5b8f66fd8ffef4
MD5 be8a455125d34a117e9b6b2f02b685d6
BLAKE2b-256 51d1d687ecffc413486b7ed2682a045a0f291832259e2966549a6910499f9684

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uharfbuzz-0.14.0-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 4.7 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.6.7

File hashes

Hashes for uharfbuzz-0.14.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 13adcd98898adbfc59808b4affc3593b38a7098d52da77c4daf3bcac50173df1
MD5 e2de41b349ae8ebac6dde6cbeca77440
BLAKE2b-256 48a7af34b069ea8e882a7c1f38a8fa9114ebcc3fd7b6bbffe5df442ec76a62c3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uharfbuzz-0.14.0-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 554.8 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.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/2.7.17

File hashes

Hashes for uharfbuzz-0.14.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f152923c952e6520bef0c2f91c8d3cd57a01c12b88a47c838d6093cbf7a425a9
MD5 6f78ed3baa7b4ef3ea0ffe215cafe1d1
BLAKE2b-256 18bd5d82e26c561cbf6f35f12ff678e1e46bca4f2e731abf6ea8d48eea073252

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for uharfbuzz-0.14.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 6c9fdddaec55c01b4357c9bb4b777ba8e0d48e49decdbbd2e6b8a00688ac2de8
MD5 c23182bc93b37ac59c7315e3cd82557e
BLAKE2b-256 c213fd86f91b102d85371d723dccb5cda47dfb8e1ca514f952adbc713be70306

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for uharfbuzz-0.14.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 cd138723129c8ecdfd5fe735e1467360f85b38242c899dc7770799b42eb69b34
MD5 ba12e976fdbdd6bd1c262f440b39a810
BLAKE2b-256 7e0162acdb2a733fc59b1c164bd508f027bc2c9ef52ceda322ba67b9efea4cad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uharfbuzz-0.14.0-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 4.6 MB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.6.7

File hashes

Hashes for uharfbuzz-0.14.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 4455a3e8b8fcc509a00858e71511e2d93e8cc0bd6ec6d1c4778f4a7ab762ee40
MD5 7ca1834181147934a538d84e2a63d84d
BLAKE2b-256 c01618310042cb850097ca7059f65c16c8cc4b09baf71b0f75acfe0a5925e859

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uharfbuzz-0.14.0-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 4.6 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.6.7

File hashes

Hashes for uharfbuzz-0.14.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f4739674b94a7dc9140e0c5d5d5e375d3281f176548eacd2f32b120a89566556
MD5 bcf8e52cb6434da89e97d5c0865b0921
BLAKE2b-256 b031090ce496d3cb1f8e4fc154eb7eafa46f843b62fe3c80a4a4bba1d52c60a1

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.14.0-cp37-cp37m-macosx_10_6_intel.whl.

File metadata

  • Download URL: uharfbuzz-0.14.0-cp37-cp37m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.7m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/2.7.17

File hashes

Hashes for uharfbuzz-0.14.0-cp37-cp37m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 5cf96b2cbe517481f16906dbc0462d72dc3b009b7eea858e322b1e9578e3fa14
MD5 5484c373fd17a1570b3251f74e75df72
BLAKE2b-256 2238024ca1f25f19b02ab784c56ba9b84faa10ebfea520dcb3b4df2f0d2d8c23

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for uharfbuzz-0.14.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 2b079d984a3cae2be5557db645408b3c35b1d03fe0ee8ef6fb50e76539d34657
MD5 699c2958849af76fb6a96e878ca13bf0
BLAKE2b-256 aa952211b5b22611a332a8b77e5517b5feb0e439476cac36ff8e804c994158a7

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for uharfbuzz-0.14.0-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 06016a146b586fb3f858d1af217897905ba57bf6047fda5a1610a875714378e6
MD5 3bc47cfa53fecf135f8ce588e80abb04
BLAKE2b-256 156d93eb4dff33f785b6f96b7c00fa6ec2fda8e78dfc58a8c6e4e0b91004e9b7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uharfbuzz-0.14.0-cp36-cp36m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 4.6 MB
  • Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.6.7

File hashes

Hashes for uharfbuzz-0.14.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 290ae80e3a7dc95e47d6541010f2fc9e3c8f80e5e99a682482b643798e344349
MD5 27a00606aeb16f149c9efbde30f012b7
BLAKE2b-256 f3134beca6b5c7548a898962f8b012d3ab7f3f2679335869a4ca5029e5b247d0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uharfbuzz-0.14.0-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 4.6 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.6.7

File hashes

Hashes for uharfbuzz-0.14.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e76a05508cfc998208770a62e3c16c0899ed61646563dd4e5ffbe95cec996761
MD5 be7e21b67be6a251ebdb2ad6de6ba8ac
BLAKE2b-256 5aff68e62f13fc5d7de41524f03afc97183fbebb60bb0182fcd5598825f1cbba

See more details on using hashes here.

File details

Details for the file uharfbuzz-0.14.0-cp36-cp36m-macosx_10_6_intel.whl.

File metadata

  • Download URL: uharfbuzz-0.14.0-cp36-cp36m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.6m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/2.7.17

File hashes

Hashes for uharfbuzz-0.14.0-cp36-cp36m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 16447dc00a677da00dc7197cf4b36cfd65c2ad7a67c2d42b18b27f71574c7785
MD5 b6f8513e2f6cea8dfb8931f41546bf4c
BLAKE2b-256 fb79787ec3d6db7b076e5b2628e862791123dce0a31f5e37134900f6141c5902

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