TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Font previews in command line with Python

2 pointsby jajjaraxover 4 years ago

1 comment

johnjackjamesover 4 years ago
I also proposed this python library (<a href="https:&#x2F;&#x2F;github.com&#x2F;MatteoGuadrini&#x2F;fontpreview" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;MatteoGuadrini&#x2F;fontpreview</a>) because it is really well done! I also tried using the FontBanner class to do more complex things: from fontpreview import FontBanner fb = FontBanner(&#x27;&#x2F;tmp&#x2F;noto.ttf&#x27;, &#x27;landscape&#x27;, bg_color=(253, 194, 45)) fb.save(&#x27;&#x2F;tmp&#x2F;fb.png&#x27;) You can also upload background images: fb.bg_image = &#x27;image&#x2F;path.jpg&#x27; fb.draw()<p>I also found this reference in stackoverflow: <a href="https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;1920129&#x2F;methods-to-create-text-preview-from-a-font" rel="nofollow">https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;1920129&#x2F;methods-to-creat...</a>