pyhershey enable simple usage of Hershey fonts within python.
Project description
pyhershey
Hershey fonts are a collection of different vector fonts developed 1967 by Dr. Allen Vincent Hershey at the US Naval Weapons Laboratory. These fonts come in different styles and include Latin, Greek, Cyrillic and Japanese (kanji, hiragana and katakana) characters and a lot of other symbols. The fonts' data are available under some restrictions. See font-data/LICENSE and here. But basically, the fonts can be used in any project.
Special about these fonts is that all glyphs are build up by straight line segments which makes their look rather special. Nevertheless, there can be cases where this feature could be highly useful and, of course, it has also some kind of style. To get an impression of the fonts, see the documentation of this package.
This package enables you to use this fonts in your python project in an easy way. The only requirement is python >= 3.8. To install it, run
pip install pyhershey[display]
This installs the package and matplotlib for displaying the glyphs. If you don't need it, just install the package without [display]
The example below shows how to use the library.
from pyhershey import glyph_factory
from pyhershey.show import show_glyph
a = glyph_factory.from_ascii('a', 'roman_simplex')
show_glyph(a)
For further details, see the documentation.
The library is licensed under the GPL3 license (see LICENSE.txt in the root directory). The font data in the font-data directory has its own license which is given in font-data/LICENSE.
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
Built Distribution
File details
Details for the file pyhershey-0.1.0.tar.gz
.
File metadata
- Download URL: pyhershey-0.1.0.tar.gz
- Upload date:
- Size: 117.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c9f70f0768fa3354bddd3428c362b3f814026e992f9e4f7661471656cf44119 |
|
MD5 | 2887aa36243b65fc1ac390a5c821a6cd |
|
BLAKE2b-256 | af4476e7a5fedfd0bd12d19822efe808c8a5bb896835e9874c51f0a39d825f8f |
File details
Details for the file pyhershey-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: pyhershey-0.1.0-py3-none-any.whl
- Upload date:
- Size: 133.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8327bb154cc8899d374e02fce44c95f2de75c5285206c0984a1bae8625efc4c |
|
MD5 | 60099536fd7e3a4b7558789a2d5048d7 |
|
BLAKE2b-256 | e2a3f70c3612f7ed9ff1269df2481c5454193036ec4eb351325b17b79430cab7 |