sameWidther
script that accepts OTF/TTF/UFO files and gets you random words of the same width, nice for specimens.
installing
- install this package via pip
python -m pip install sameWidther
- install directly from cloned repo, navigate to the repo in your terminal
python setup.py install
usage
- you can use it as commandline tool
sameWidther Desktop/sameWidth/font.ufo ENG 4000 10
- or directly in your python script
from sameWidther import SameWidther, TTFont, Font
# font = SameWidther(Font('font.ufo'), 'ENG')
font = SameWidther(TTFont('font.otf'), 'GER')
print(font.getWords(3000, 10, case='upper'))
arguments
positional
- font - path to OTF/TTF/UFO file that you want to use
- language - three letter code of language that you want to have the words in, ENG/GER available. Or provide existing path to a database in json format of such structure
["word", "house", "word2", ...] - width - width of the words
- wordCount - number of words that you need
optional - keyword arguments
- threshold - (default: 10) how much in width can the words differ
- case - (default: lower) do you want to lower, upper or capitalize the case of the words?
word databases
- [ENG] English https://github.com/dwyl/english-words
- [GER] German https://github.com/creativecouple/all-the-german-words
other resources
- customized OTF/TTF kern dump https://gist.github.com/m4rc1e/59017729923ac4930dcd76823c0acb91
Happy Specimening
Metadata
Release files for sameWidther 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sameWidther-0.0.5.tar.gz | 3.0 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sameWidther-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.1 MB
Release files / sameWidther-0.0.5.tar.gz
| Download URL | sameWidther-0.0.5.tar.gz |
|---|---|
| Size | 3.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
df32615633d3177cb0a81566d6733f5ad7fbee15d5ecb9ef7a33e283a4c47401
|
|
BLAKE2b-256 checksum How to use checksums |
66f2dcbce07131713ddce15348c4ca90469fb9d68231787a90540d37a6c91291
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1
|
Release files / sameWidther-0.0.5-py3-none-any.whl
| Download URL | sameWidther-0.0.5-py3-none-any.whl |
|---|---|
| Size | 3.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
14ef433dad2cf5b1af83c7b4f1f7dd660a61a5bc734c30de50dee91c3c7772c5
|
|
BLAKE2b-256 checksum How to use checksums |
50fff9c3bb8bbc363ff3ea588002883b6331a868bbf82024b635568f7a925b46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1
|