TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Font previews in command line with Python

2 点作者 jajjarax超过 4 年前

1 comment

johnjackjames超过 4 年前
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>