支持文本路径的文本渲染库

发布于 2024-09-07 10:07:57 字数 305 浏览 3 评论 0原文

我需要一个良好、可靠的库或工具链,用于以编程方式将具有不同大小、字体、粗细等的文本渲染为 png。它还需要能够以弧线或路径渲染文本。我希望它能够很快,因为我会像在服务器上运行它一样。

我尝试过使用 SVG 和 librsvg,但这不会渲染 元素。

我已经尝试过 pycairo,但同样,文本到路径效果不佳,并且在 cairo 文档中的所有地方都提到文本到路径是一个“玩具”,不应该用于严肃的应用。

Python 绑定是最好的,因为服务器运行 python。但我会接受任何建议。

I need a good, reliable library or toolchain for programatically rendering text to png, with different sizes, fonts, weights, etc. It also needs to be able to render text in an arc or to a path. I would like it to be fast, because I'd be running it as on a server.

I've tried using SVG and librsvg, but that doesn't render <textPath> elements.

I've tried pycairo, but again, the text to path doesn't work great, and everywhere in the cairo documentation it mentions that text-to-path is a "toy" and shouldn't be used for serious applications.

Python bindings would be best, because the server runs python. But I'll take any suggestion.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦魇绽荼蘼 2024-09-14 10:07:57

Qt 有一个 SVG 模块,我相信它支持 textPath 元素。

http://doc.trolltech.com/4.1/qtsvg.html

Qt has a SVG module, i believe it supports the textPath element.

http://doc.trolltech.com/4.1/qtsvg.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文