简体   繁体   English

Can Cairo(图形库)可用于渲染数学公式和图片(乳胶风格)吗?

[英]Can Cairo (the graphics library) be used to render mathematical formulas and pictures (latex style)?

Does it need any dependencies for full-fledged unicode character rendering, or can it read and render any platform's (Linux/Max/Windows) native font glyphs without much problems? 它是否需要完全成熟的unicode字符呈现的依赖关系,还是可以读取和呈现任何平台(Linux / Max / Windows)本机字体字形而没有太多问题?

Can it import/render eps/pdf/svg inside a produced pdf file, or would I have to manually parse the image file, and redraw it in Cairo? 它可以在生成的pdf文件中导入/渲染eps / pdf / svg,还是我必须手动解析图像文件,并在Cairo中重绘它?

Cairo per se does not do "formulas" - it can work with the full set of unicode characters, but I think text support is better if you use the "pango" library along with Cairo. 开罗本身不做“公式” - 它可以使用全套unicode字符,但我认为如果你将“pango”库与开罗一起使用,文本支持会更好。

As for importing a vector format, there is "librsvg" which works along with cairo enabling it to be used to render SVG files - this lets up to other libraries - maybe Tex itself, to render mathematical formulas themselves. 至于导入矢量格式,有“librsvg”与cairo一起使用,使其能够用于渲染SVG文件 - 这可以让其他库 - 也许是Tex本身 - 自己渲染数学公式。

As for Pictures, yes, Cairo can import and draw raster pictures on itself. 至于图片,是的,开罗可以自己导入和绘制光栅图片。

I have an example of using librsvg with Cairo on this answer , though it is in Python, not in C. You will have to look for the online docs on both libraries to get examples of it working in C. (I remeber there were such, because there were no Python examples, I had to get this one working from the examples given in C). 我有一个使用librsvg与Cairo 在这个答案上的例子,虽然它是在Python中,而不是在C中。你将不得不在两个库上寻找在线文档以获得它在C中工作的例子。(我记得有这样的,因为没有Python示例,我必须从C)中给出的示例中得到这个。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM