Name | vharfbuzz JSON |
Version |
0.3.1
JSON |
| download |
home_page | None |
Summary | A user-friendlier way to use Harfbuzz in Python |
upload_time | 2024-08-12 14:10:07 |
maintainer | None |
docs_url | None |
author | None |
requires_python | None |
license | MIT License Copyright (c) 2021 Simon Cozens Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# vharfbuzz - A user-friendlier way to use Harfbuzz in Python
[uharfbuzz](https://github.com/harfbuzz/uharfbuzz) is an _awesome_ tool for shaping text in Python. But it wraps the Harfbuzz C interface quite closely, so still requires you to perform a bunch of boilerplate operations before you can get on with the shaping. This module allows you a slightly more high-level interface to the text shaping process. For example, rather than:
```python
with open(sys.argv[1], 'rb') as fontfile:
fontdata = fontfile.read()
text = sys.argv[2]
face = hb.Face(fontdata)
font = hb.Font(face)
buf = hb.Buffer()
buf.add_str(text)
buf.guess_segment_properties()
features = {"kern": True, "liga": True}
hb.shape(font, buf, features)
```
with `vharfbuzz` you can just say:
```python
vhb = Vharfbuzz(sys.argv[1])
buf = vhb.shape(sys.argv[2], {"features": {"kern": True, "liga": True}})
```
The `Vharfbuzz` class also contains a number of other helpful methods to perform common operations on Harfbuzz buffers. See [Read The Docs](https://vharfbuzz.readthedocs.io/en/latest/) for more information.
## Installation
vharfbuzz is available from `pypi`, so can be installed like so:
pip3 install vharfbuzz
If building from source, you can install it like so:
pip3 install -r requirements.txt
pip3 install .
Raw data
{
"_id": null,
"home_page": null,
"name": "vharfbuzz",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "Simon Cozens <simon@simon-cozens.org>",
"download_url": "https://files.pythonhosted.org/packages/b2/56/bc4b0ba473618e5824f7d21a8151e0bc267bb33df33474b2eb1e3beda943/vharfbuzz-0.3.1.tar.gz",
"platform": null,
"description": "# vharfbuzz - A user-friendlier way to use Harfbuzz in Python\n\n[uharfbuzz](https://github.com/harfbuzz/uharfbuzz) is an _awesome_ tool for shaping text in Python. But it wraps the Harfbuzz C interface quite closely, so still requires you to perform a bunch of boilerplate operations before you can get on with the shaping. This module allows you a slightly more high-level interface to the text shaping process. For example, rather than:\n\n```python\nwith open(sys.argv[1], 'rb') as fontfile:\n fontdata = fontfile.read()\n\ntext = sys.argv[2]\n\nface = hb.Face(fontdata)\nfont = hb.Font(face)\n\nbuf = hb.Buffer()\nbuf.add_str(text)\nbuf.guess_segment_properties()\n\nfeatures = {\"kern\": True, \"liga\": True}\nhb.shape(font, buf, features)\n```\n\nwith `vharfbuzz` you can just say:\n\n```python\nvhb = Vharfbuzz(sys.argv[1])\nbuf = vhb.shape(sys.argv[2], {\"features\": {\"kern\": True, \"liga\": True}})\n```\n\nThe `Vharfbuzz` class also contains a number of other helpful methods to perform common operations on Harfbuzz buffers. See [Read The Docs](https://vharfbuzz.readthedocs.io/en/latest/) for more information.\n\n## Installation\n\nvharfbuzz is available from `pypi`, so can be installed like so:\n\n pip3 install vharfbuzz\n\nIf building from source, you can install it like so:\n\n pip3 install -r requirements.txt\n pip3 install .\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2021 Simon Cozens Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "A user-friendlier way to use Harfbuzz in Python",
"version": "0.3.1",
"project_urls": {
"Issues": "https://github.com/simoncozens/vharfbuzz/issues",
"Repository": "https://github.com/simoncozens/vharfbuzz"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9ce8210a1e06825bd743b963d85d705a09913a458516aa2a626bda1e7125925e",
"md5": "6a4346981594fcaa93844bcaa87c7685",
"sha256": "410bdc2d4bc6da5d022eb3c50f77f772222ef1fbcbe0c5da8b91280b3030ae6b"
},
"downloads": -1,
"filename": "vharfbuzz-0.3.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6a4346981594fcaa93844bcaa87c7685",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 7346,
"upload_time": "2024-08-12T14:10:06",
"upload_time_iso_8601": "2024-08-12T14:10:06.682180Z",
"url": "https://files.pythonhosted.org/packages/9c/e8/210a1e06825bd743b963d85d705a09913a458516aa2a626bda1e7125925e/vharfbuzz-0.3.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b256bc4b0ba473618e5824f7d21a8151e0bc267bb33df33474b2eb1e3beda943",
"md5": "5dcb2bfc04fded0f4cd88cced69f4dd6",
"sha256": "cc5570f0dc61edc449364fd2ec3dee88819284132267f25eb92757e2137de247"
},
"downloads": -1,
"filename": "vharfbuzz-0.3.1.tar.gz",
"has_sig": false,
"md5_digest": "5dcb2bfc04fded0f4cd88cced69f4dd6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 12389,
"upload_time": "2024-08-12T14:10:07",
"upload_time_iso_8601": "2024-08-12T14:10:07.611570Z",
"url": "https://files.pythonhosted.org/packages/b2/56/bc4b0ba473618e5824f7d21a8151e0bc267bb33df33474b2eb1e3beda943/vharfbuzz-0.3.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-12 14:10:07",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "simoncozens",
"github_project": "vharfbuzz",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "vharfbuzz"
}