Socket
Socket
Sign inDemoInstall

sameWidther

Package Overview
Dependencies
2
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    sameWidther

Gets random words of the same width for given font


Maintainers
1

Readme

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

Happy Specimening

Keywords

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc