Can Cairo (la libreria grafica) essere utilizzato per rendere le formule matematiche e immagini (stile lattice)?

StackOverflow https://stackoverflow.com/questions/6816955

Domanda

Ha bisogno di tutte le dipendenze per il rendering dei caratteri Unicode a tutti gli effetti, o può leggere e rendere qualsiasi piattaforma (Linux / Max / Windows) glifi dei caratteri nativi senza troppi problemi?

Può importare / render ENV / pdf / svg all'interno di un file pdf prodotto, o avrei dovuto analizzare manualmente il file di immagine, e ridisegnare in Cairo?

È stato utile?

Soluzione

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.

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.

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).

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top