Streamlined Cython bindings for the harfbuzz shaping engine
Project description
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.8.0.zip
(28.4 kB
view hashes)
Built Distributions
uharfbuzz-0.8.0-cp38-cp38-win32.whl
(266.3 kB
view hashes)
uharfbuzz-0.8.0-cp37-cp37m-win32.whl
(265.6 kB
view hashes)
uharfbuzz-0.8.0-cp36-cp36m-win32.whl
(265.7 kB
view hashes)
Close
Hashes for uharfbuzz-0.8.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 284a4dd0bf49cf803531aa23869fd525f09fb0470970ea854d8958ee793b1193 |
|
MD5 | f4ba86e268e3347f5e67c9cd2c4163da |
|
BLAKE2b-256 | b57af99918825df93abc0d30e718ad4fab8fb2a6ad951d805bd08f14d27a079e |
Close
Hashes for uharfbuzz-0.8.0-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7ec685c28a422d30d278a565398111130574e6b706029ccd6f9faea3438d48e |
|
MD5 | 1f278321aae204572dcb7daa72a29caa |
|
BLAKE2b-256 | 731ad0013432fec88f8d9fc5e671f04678b4d126942d4cc134a9bde732ced64f |
Close
Hashes for uharfbuzz-0.8.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43fcad481b5d3d2138caeb998fa53f64fbbb5cfafd5c05ee85c9aec5fc0d75f4 |
|
MD5 | abe5cec4f00e6affcaf6daf68665079b |
|
BLAKE2b-256 | 4e61f7a9239768f1db0551500b29403962c2353d1bc33b757883f065260ab78b |
Close
Hashes for uharfbuzz-0.8.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9230da6b805d355afb418864987fa1af0fa7efffbea7c0fbd8edddfa54d09b3 |
|
MD5 | 24891ce68bc445a92db922a40050cd73 |
|
BLAKE2b-256 | 2f42728ba47cb4e6c20fee77a8c13864172f40f3074cae394d9cd8daf54bcaf8 |
Close
Hashes for uharfbuzz-0.8.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98cd07ebb80b3a3398197ddade322340544b99983acbd868d599f0c118e1f188 |
|
MD5 | 550b389e1e53dbf6234dd6d9287b86cf |
|
BLAKE2b-256 | 31178d0695ca7cd6265a6750e993e627f63a87e433911270e4ee399528a21864 |
Close
Hashes for uharfbuzz-0.8.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b05e5a8c3e4aa78fccff0137b216824f67da6c374bf6ace5e965a77868d89f6 |
|
MD5 | cfcae6194ca65d8e674fa311f8b6e2ea |
|
BLAKE2b-256 | 6df423ca810ddce9ab257132ed0b270044c842a7025d2e5b45edcfa4131ec512 |
Close
Hashes for uharfbuzz-0.8.0-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2b8d9d8087fadb0a6874b0dfe1af1db20d43d75be881f4371843b5d2df511c4 |
|
MD5 | 249713c7adafe8de001da74b763b3a9f |
|
BLAKE2b-256 | baeec0ea1e2eb14d3c5c4ca6301ceb8f8ad9854bdb6816b6940a31830030eedf |
Close
Hashes for uharfbuzz-0.8.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2830d73cfe39048e4eb6f8ad1e10e5e8afaf61d629ff6915330f07690e18697d |
|
MD5 | 13fa2be07f12a9b69161cc076325228c |
|
BLAKE2b-256 | 30aea9d8e74a6a213f7f335c1b0e2f4947b3319549fd2d3a67e092429b1fbc04 |
Close
Hashes for uharfbuzz-0.8.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5eaa60aadefc45198796367305d8d966b81364b087f82e808903ffb37652c31 |
|
MD5 | b02fc8e0b2ffd168d17c4d7f178d823d |
|
BLAKE2b-256 | dcd8ac55641d94ce948405ffb8d97d130078b53293939d87f15110f1c4452ace |
Close
Hashes for uharfbuzz-0.8.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d99d33598e1099425ae21ae6a4430ead3395b06892134df00a80dad09f4c32b |
|
MD5 | 49de94c0b5b171e0a1472c200ea637ce |
|
BLAKE2b-256 | f5d8bc7886b02ff1fe5b8a900f421544c7050c8b6dc99cfcb6437a0846b46c55 |
Close
Hashes for uharfbuzz-0.8.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 268e3f89c00a23baed62610e30e310153767c32e40823fd58ec141fb12f56052 |
|
MD5 | c452f31fda9f30f09f911e8456e3469c |
|
BLAKE2b-256 | 8eaa5d1c70bb30254a4c53c50f3a5b9244ffc0ca0e80bb35e20a7045ffe0cce1 |
Close
Hashes for uharfbuzz-0.8.0-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 052d33d2e51b32e8b062abb7548f31b3c70907418d554ddf1e9bcbec0dc12c51 |
|
MD5 | 1ea2eead170b3c04cd4f8cb2bdf52a39 |
|
BLAKE2b-256 | 1f0035dd1aead56fa793e5b08c0d2ba5c9d813cff36ebc9cb899002fcc4f9c16 |
Close
Hashes for uharfbuzz-0.8.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66f77e6cf48ebd7b9b500fc2fdfb1dec87dc4a03a2674bc1846af274b8e52aee |
|
MD5 | 5bd8026567d16e3ee88caf88aa69b2a4 |
|
BLAKE2b-256 | 0d9c3c3b777d11743044def9d1710e9a490489168bdd0a6fb6e2bd65db3999fa |
Close
Hashes for uharfbuzz-0.8.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4e0bdc7ca0794cc5f1b2f938c1da4d87ff8f54983b92c30405a1502bf92f8b7 |
|
MD5 | f9f57df7e551d63e9760b27c7e9f6126 |
|
BLAKE2b-256 | 12863e4ca22a306150695ef49a82ce59c26cf9dd201c547dca4cee48c0994ebb |
Close
Hashes for uharfbuzz-0.8.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e44ac4ae4349d80489af4cf49bd3ce1e629bac5be05999d39b9a3cb341bcfc4 |
|
MD5 | a45376b9bd0339d891db7ae2aedbce62 |
|
BLAKE2b-256 | ec697bcab2e96b106eb510b8b43d6a3adbf03f5496860c979ce474b423cb0908 |