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.4.tar.gz
(3.0 MB
view hashes)
Built Distribution
Close
Hashes for sameWidther-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 130abaf019397477e52fd7fbc936a53a152ba19a8ddf684b4ef50fc01e14beac |
|
MD5 | c6980009da92df589a69ccb896b614ef |
|
BLAKE2b-256 | 5afe8b618668e91d080af7189e7a2045c6cdc476e60a8e28b21acb626857694f |