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

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

本文介绍了支持路径文本的文本渲染库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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.

我尝试使用SVG和librsvg,但是不会渲染<textPath>元素.

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

我已经尝试过pycairo,但是同样,路径文本不能很好地工作,并且在cairo文档中到处都提到,文本路径是玩具",不应用于认真的应用.

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绑定,因为服务器运行python.但我会提出任何建议.

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

推荐答案

Qt具有SVG模块,我相信它支持textPath元素.

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

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

这篇关于支持路径文本的文本渲染库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 08:45