I want to write a program that I can give a font-path, a string and a rotation-angle, which then renders the (vectorially) rotated text to a png.
I have gone through several libraries, such as skia, cairo, PIL, matplotlib, svgwrite,... I can not for the life of me find something that actually works. Most of them use raster rotation, which is what I don't want. I think I was the closest with svgwrite, but couldn't load a custom font (as well as it being really difficult to work with overall).
Any ideas on how to do that?
I recommend using a combination of the Python libraries Cairo and Pango.
What do you think about this example?