I've several lines of text and I'd like each to fit in width (scaling the font size) to the width of the Context. Is there a way of doing this? I'm using pangocairo and python for this.
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
I wish to have time for a working solution, but you can start with something like:
Result:
I will left improving this algorithm as an exercise for the reader, you can try to:
pangocairo_context
insteadpycairo
until I read your question and goggled for the docs.