I was trying to write a program in python that can takes in a svg file as background and output the svg file with text on that background.

For example, if the input svg file is a circle, I want to output the svg file that has some texts inside that circle?

Is there any library to do that? Thanks a lot

  • SVG is just a subset of XML, so any XML parser/writer will do.
    – Glorfindel
    Apr 28 '19 at 6:50

Yes, the famous Cairo library in Python (PyCairo) is able to do exactly that! https://pycairo.readthedocs.io/en/latest/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.