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.13.2.zip
(1.1 MB
view hashes)
Built Distributions
uharfbuzz-0.13.2-cp38-cp38-win32.whl
(336.5 kB
view hashes)
uharfbuzz-0.13.2-cp37-cp37m-win32.whl
(334.6 kB
view hashes)
uharfbuzz-0.13.2-cp36-cp36m-win32.whl
(334.8 kB
view hashes)
Close
Hashes for uharfbuzz-0.13.2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d26a95e3925db547132d34e41b1137066fdf6e510a33663ccdd7a03cbc5454a8 |
|
MD5 | 8b525cd8e83a3267e70f782c3692b92f |
|
BLAKE2b-256 | 17f96853e9b6d6b4377092d6176a57e9126863b9605438bb59c80fa909a21f98 |
Close
Hashes for uharfbuzz-0.13.2-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f7cc1778b11bcd48f866caa09ceab9af8742d1ec05b29e63b3e82fe83604eca |
|
MD5 | 9d33fe7493675462b208bbf202f8c6ec |
|
BLAKE2b-256 | 010c6e2cd35dff66e0f2fe60e23602e298728af8f59ec138bc32047d0b317e9c |
Close
Hashes for uharfbuzz-0.13.2-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aedb8e740372d7e8ceffd7941698f0be74e1024ced0f700f67ed9c19d4088e72 |
|
MD5 | 5a18a7b77c5abefb01fa45bb1dc4cc95 |
|
BLAKE2b-256 | d2957f2336d9bed3205aefc6e7107a5c38b17d892faf6f233c7e558afcf5edb6 |
Close
Hashes for uharfbuzz-0.13.2-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a653d28ffbda3862f0ce8786b6a9a0f40741e7561ca82c03887da66109f4b381 |
|
MD5 | 04fe3dc73f8848f2b63a129b2dddf2d1 |
|
BLAKE2b-256 | e59ca2355bd458307db52b9ce70d8b55b800ff530bc6e5d0fa527491d6fa6ddf |
Close
Hashes for uharfbuzz-0.13.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0174a42e6b7243007e8c178aa947fd9218cc6577a0e1c641ef76bcecfc3fbc0 |
|
MD5 | 4fcab0b42830944aa56168aa8ab95120 |
|
BLAKE2b-256 | 1766a116f37a837ad35635f2bbf26838dd0ded7f842225cf81e0b3f11a563e31 |
Close
Hashes for uharfbuzz-0.13.2-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd80c8950682653abf3c7523078cc1bfc903abc48d0a84c8e65969b42e11da81 |
|
MD5 | 9b1b6eaeffaebe0aa43b3ca414bc4d9c |
|
BLAKE2b-256 | 0f87faa8c764c575334cb8038f793baea7fab5f08e8f06eebb647e9a907ab6f4 |
Close
Hashes for uharfbuzz-0.13.2-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95d582fc7c86c9734a5be8244ba19822694e23f6ffcb5ab99dc8af4e350cb6a2 |
|
MD5 | fb80573b746f3634ca4444e84dc16ded |
|
BLAKE2b-256 | 2b98a7c5af75b468e097db92ed7045a9638a2346e2c5e931cfc13349171a7243 |
Close
Hashes for uharfbuzz-0.13.2-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df58f10f567ef3e7b7020b93d0390f87caec1ee056a817b8550eda9b0d5a40ec |
|
MD5 | 9aefd7023696dca3cff7ef48f72bfffd |
|
BLAKE2b-256 | 9a18734d6748cdcea0990b06cbee899de125f26cecb0e52661019471d69fb548 |
Close
Hashes for uharfbuzz-0.13.2-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7375a905be7af570af60bee3db700a058029c7583c52c7d11633efc819f0ccff |
|
MD5 | ed649e00c4a8bfe86596295befe52ce0 |
|
BLAKE2b-256 | 42ae520c85cd15468f42ba86771c5d177f1044de03c89b7f4849c64981da53d3 |
Close
Hashes for uharfbuzz-0.13.2-cp37-cp37m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65f9d8eeb95640ecfcfcce9cb20c48d9d7fed3233cecd544c145fb55e7105a39 |
|
MD5 | d43db59dde6a397f8abdddbbe34b6909 |
|
BLAKE2b-256 | 1e9ec44f448beb78cb16ab2cc804c7af78de810959c1632e5601a41e385f6c86 |
Close
Hashes for uharfbuzz-0.13.2-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 942d32837aa9aa40259c0ad8bbe8b289001975872f40c70ac3dd21b414612d8e |
|
MD5 | 807091b9359c144ca52c4a85720db2a5 |
|
BLAKE2b-256 | 4a04602d242ffad4a43858f5f1f99e7f0ef9ae96ff74478b8c1da9d2a77c377c |
Close
Hashes for uharfbuzz-0.13.2-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc762c4ecbf84d2f2e6018ed8bb037005b6c86917ef5bc4e0443f5c70ce50bf8 |
|
MD5 | f52d713f0b724dc80da071f353c558e2 |
|
BLAKE2b-256 | cfaa7aa795bd845e76a3754b076571dfc7194822b205ef9944bc156b69696636 |
Close
Hashes for uharfbuzz-0.13.2-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63df6e71bc6157e91f93fd680bb508c95e15e369e16df3c1520cb92458d7151e |
|
MD5 | 2d06f2a5fb77b166f5c01c607b63257f |
|
BLAKE2b-256 | 37c42e865cf667248c259afb373b9028d6082b15b89f10095049874bbc5f30dd |
Close
Hashes for uharfbuzz-0.13.2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ae5a1da41e463f2e0ece8fb1a7a035acd9109dbcf025893c7ff6387de21901b |
|
MD5 | d2b61d39aff0d57b21ebe5241971d5eb |
|
BLAKE2b-256 | c881237564f0bc8f1114079d8674ca4727b6bdfba464fa2e2c509bbb4ec72497 |
Close
Hashes for uharfbuzz-0.13.2-cp36-cp36m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | babd82d4de1f43cd2eafe45bbba9ee87de51d7b96e83eb48af567b80f3dcbccb |
|
MD5 | a956e8ef91f09bac6ac0b2baec86d24f |
|
BLAKE2b-256 | 1fa87a6f76e749cf81f215532be20be9311a06b38f0fbc34edaef88170c31104 |