Open doudouodong opened 1 year ago
Sorry, I don't understand, it seems to be working in your PNG. What's the bug?
I see:
$ python3
Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyvips
>>> text = pyvips.Image.text(" The package is on the way. It can be", dpi=600)
>>> text.write_to_file("x.png")
>>>
To make:
Ah, the leading spaces? Pango removes leading and trailing whitespace, you'll need to find some other way to format your text.
What effect are you trying to achieve?
spaces disappear
https://github.com/libvips/pyvips/assets/47808515/da2272ee-6285-4065-968a-474dd549b96b)