Re:Font previews in command line with Python
by johnjackjames on Thursday January 07, 2021 @09:40AM
(#25671517)
I also proposed this python library (https://github.com/MatteoGuadrini/fontpreview) because it is really well done! I also tried using the FontBanner class to do more complex things:
from fontpreview import FontBanner
fb = FontBanner('/tmp/noto.ttf', 'landscape', bg_color=(253, 194, 45))
fb.save('/tmp/fb.png')
You can also upload background images:
fb.bg_image = 'image/path.jpg'
fb.draw()
I also found this reference in stackoverflow: https://stackoverflow.com/questions/1920129/methods-to-creat...