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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

uharfbuzz-0.13.0-cp38-cp38-win_amd64.whl (391.3 kB view details)

Uploaded CPython 3.8 Windows x86-64

uharfbuzz-0.13.0-cp38-cp38-win32.whl (336.5 kB view details)

Uploaded CPython 3.8 Windows x86

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

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

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

Uploaded CPython 3.8

uharfbuzz-0.13.0-cp38-cp38-macosx_10_9_x86_64.whl (551.3 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

uharfbuzz-0.13.0-cp37-cp37m-win_amd64.whl (388.7 kB view details)

Uploaded CPython 3.7m Windows x86-64

uharfbuzz-0.13.0-cp37-cp37m-win32.whl (334.6 kB view details)

Uploaded CPython 3.7m Windows x86

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

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

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

Uploaded CPython 3.7m

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

Uploaded CPython 3.7m macOS 10.6+ intel

uharfbuzz-0.13.0-cp36-cp36m-win_amd64.whl (388.8 kB view details)

Uploaded CPython 3.6m Windows x86-64

uharfbuzz-0.13.0-cp36-cp36m-win32.whl (334.8 kB view details)

Uploaded CPython 3.6m Windows x86

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

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

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

Uploaded CPython 3.6m

uharfbuzz-0.13.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.13.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: uharfbuzz-0.13.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 391.3 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.48.2 CPython/3.7.5

File hashes

Hashes for uharfbuzz-0.13.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 8c816df12f3b16b1a0bcd1198e8ea9149cf114a7856869d3bd8f2c81db981c9b
MD5 3626218dd20f6a45e6519d5ae224e892
BLAKE2b-256 f830234a8749556ef914f9a95c1390e18190c1d772aebefa6cde103086b3889d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uharfbuzz-0.13.0-cp38-cp38-win32.whl
  • Upload date:
  • Size: 336.5 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.48.2 CPython/3.7.5

File hashes

Hashes for uharfbuzz-0.13.0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 ea6746101bd0a4a69594759a56ceb45b7444f16a63369b864e120521f311dd6d
MD5 2626adb7a6cd6feca15a836170df6417
BLAKE2b-256 92a09e4dbbccfb0ad3d6a3c61ae9be6195beda83f9b3da15872321b78fb0e682

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uharfbuzz-0.13.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.48.2 CPython/3.6.7

File hashes

Hashes for uharfbuzz-0.13.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 8633dbb0c57d29fbd76d97c65ac86045337fb499159e8701d3829aec2f7d18fa
MD5 2647d960008f1fb1af37601e329701bf
BLAKE2b-256 8f7530fd4a07319d7aa2bf438315b8ba75a740872045383e36085550fb422d8c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uharfbuzz-0.13.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.48.2 CPython/3.6.7

File hashes

Hashes for uharfbuzz-0.13.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 581321481b33215f95853f10cf26d5bc942713ca5e62596180cb70647cee581e
MD5 8549ae86b05508aa71bf498ffb462510
BLAKE2b-256 5fc17d3b2adbd0b84ff3600d58e089892ce17a6dba281cd32c7d7d27cc17d4cc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uharfbuzz-0.13.0-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 551.3 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.48.2 CPython/2.7.17

File hashes

Hashes for uharfbuzz-0.13.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 eb956d63c1bac3e161b1270827b4b4f185d10603e3dcfff6267becd8249a9818
MD5 9178d76db6ebbbc03dcf54fb4f662868
BLAKE2b-256 88c581dcbdaa0ef7bf33e4ff71f17e32d7fc7de8e93678f953fd709d877e3f29

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uharfbuzz-0.13.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 388.7 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.48.2 CPython/3.7.5

File hashes

Hashes for uharfbuzz-0.13.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 5e1e5fd1233b4c78be555c90551c63cc503f1cda5d3d52e36cc96c821e4627ba
MD5 7700ab5b749333bd557a7eda66b01286
BLAKE2b-256 ff2eb651649cc5caa8ee17c4c85e99ec4b8fafbf4604c858b2fb5a33a0e22146

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uharfbuzz-0.13.0-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 334.6 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.48.2 CPython/3.7.5

File hashes

Hashes for uharfbuzz-0.13.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 e8f5da080bece9ff1e03abc14d9637a063fe15ce5b2dbd691dc3ff033ab0110f
MD5 3fcf74109ec34a35c3363369054ff1d0
BLAKE2b-256 e1623975fde37f6fc2cc86bac5bef1f2ba4501fd487ecf72b747d731c105722c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uharfbuzz-0.13.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.48.2 CPython/3.6.7

File hashes

Hashes for uharfbuzz-0.13.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 33e85593c213a37208c8c6b15483519a9be64542b044bbec25f640e8666fee49
MD5 537256fdcf295c2864eced2e45ec00a5
BLAKE2b-256 1a75ff5eb555e956247b0c009d2e7a7429acf23019e7bc91d761ed2672f10aa0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uharfbuzz-0.13.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.48.2 CPython/3.6.7

File hashes

Hashes for uharfbuzz-0.13.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 65c5dfa5e8d66b179357f372df955ff43619994f9cf9784d4b4ddbe28d61cdee
MD5 c1af25783228e5d8c7e1d835940a190b
BLAKE2b-256 9ccfd7460b7a261016c5585e71ab099ebb670e66867eaf76334841bf899408f2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uharfbuzz-0.13.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.48.2 CPython/2.7.17

File hashes

Hashes for uharfbuzz-0.13.0-cp37-cp37m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 08772e097a55575bf56fd6f40d986fb7338aa8d0aa6cd6159837a78d87f8706e
MD5 2b6261afb63b4d652c8b224a35eb15b5
BLAKE2b-256 35bcc727f01c2b6c3034f3ba8e80ff3a68812e3a2c7748e1e410bba6df6da05b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uharfbuzz-0.13.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 388.8 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.48.2 CPython/3.7.5

File hashes

Hashes for uharfbuzz-0.13.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 de1927b27f39c70548b9268b7dd7323f6ba4af083ae3d2e30c9f9a70b06a6e33
MD5 e35519d805d2a9eb328d92d89df895b6
BLAKE2b-256 b71cc30962ecc4fdbf3a0ec3bd9fb242af86d224b891c5058d984210d0ba4f80

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uharfbuzz-0.13.0-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 334.8 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.48.2 CPython/3.7.5

File hashes

Hashes for uharfbuzz-0.13.0-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 e76a6e747d7e98cf1b541766be5b5828333765631559fca1e27fefe8b9bea836
MD5 272c3c4755ca343acdb11991a7181201
BLAKE2b-256 a65a6353bffc85c2c68e9e5cd4d1001093124974a331e5efb77385487d2080d4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uharfbuzz-0.13.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.48.2 CPython/3.6.7

File hashes

Hashes for uharfbuzz-0.13.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 d04bc4f16f3d23647072e81f87c723d23097c278355ad36c68e871538ff5e054
MD5 395a0face03417a4f3b91dfbab2041d3
BLAKE2b-256 4302cd44125e2602caf1698c358c7698e09e7ca8d90f7e34fc6ebd5a9e83ee05

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uharfbuzz-0.13.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.48.2 CPython/3.6.7

File hashes

Hashes for uharfbuzz-0.13.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a5a0424203a485a56b7b09ba6b5d3f8e6de07f08d019aa7fc8eed0f78335d28f
MD5 1eedef5e322ee2be3eb47a4dd7e7329c
BLAKE2b-256 168649d7e8d565fea76513719ee82560ad9a2ab7f09cefe817a42fcd251f4f15

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uharfbuzz-0.13.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.48.2 CPython/2.7.17

File hashes

Hashes for uharfbuzz-0.13.0-cp36-cp36m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 3fad40e50a4892ea3416baa311255cfb8df056383c9fcb53e0010d01823f138e
MD5 61a0b7e6c90658ff7a5f588ff6a0d4fc
BLAKE2b-256 f72f3a2dc1094e3ceeb3b8727f1c47ba562297d6601e3bcb2c217a8db019769c

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