Gets random words of the same width for given font
Project description
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))
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
- 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
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
sameWidther-0.0.3.tar.gz
(3.0 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sameWidther-0.0.3.tar.gz.
File metadata
- Download URL: sameWidther-0.0.3.tar.gz
- Upload date:
- Size: 3.0 MB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d52b040adfda675ec0b56d070c6c76c88fe131e884efc9bbe51646be3d5c758d
|
|
| MD5 |
3fa509b6ca65408b7e363bdf5b12fca9
|
|
| BLAKE2b-256 |
c42410b1066172f492bb0d54cfe2a8276b3b03889fb2ca15e40f56a1c4030ce9
|
File details
Details for the file sameWidther-0.0.3-py3-none-any.whl.
File metadata
- Download URL: sameWidther-0.0.3-py3-none-any.whl
- Upload date:
- Size: 3.0 MB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4eeb4c588807e45e0e82af3ff05d05ae50cbf3e8ab1bf5c24f2b5c264ae9f56
|
|
| MD5 |
b9f881ba9e9d1a3f647ccb08f7397fed
|
|
| BLAKE2b-256 |
e1fe89708d076b6a463e34ee73d06f34d62ed0f6f86bcdca22193184fe7f45af
|