Generate PNG file from Text.
Use the package manager pip to install foobar.
pip install Pillow
from text2Png import text2png
text = "Hello, world!" # You can change text here.
font_path = "ShantellSans-Italic-VariableFont_BNCE,INFM,SPAC,wght.ttf" # You can change font here.
# Save to PNG
image = text2png(text, font_path)
image.save('text.png')
You can use the example in the run.py
file.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.