How to do text wrapping in pyCairo + Pango?

I need pyCairo:

  • create a 100x100 image containing some text and an image from the file system as a background
  • the text should be in a box with text packaging 20x20 in size with the lower left corner (40.40).
  • save this image
+4
source share
1 answer

You need to find a way to get the Pango context and set pango.Layout.set_wrap() and pango.Layout.set_width() .

+3
source

All Articles