We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#!/usr/bin/env python3 import aggdraw from PIL import Image, ImageDraw, ImageFont im = Image.new("RGBA", (256, 256), (255, 255, 255, 255)) draw = ImageDraw.Draw(im) font = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf", 42) draw.text((0, 0), "this\nis\nmultiline", font=font, fill=(0, 0, 0)) im.save("Pillow.png") im = Image.new("RGBA", (256, 256), (255, 255, 255, 255)) draw = aggdraw.Draw(im) font = aggdraw.Font("black", "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf", 42) draw.text((0, 0), "this\nis\nmultiline", font) draw.flush() im.save("aggdraw.png")
Pillow:
aggdraw:
The text was updated successfully, but these errors were encountered:
To be clear, this isn't meant to work and is a missing feature in aggdraw. Looking at PIL's source code it looks like they have a completely separate method for multiline text (possibly added later): https://github.com/python-pillow/Pillow/blob/da39d4034213cae7e575d5e2252d7705080ab796/src/PIL/ImageDraw.py#L264-L409
Pull requests are welcome, but this functionality may be simpler if/when we move to cython as the core aggdraw language.
Sorry, something went wrong.
No branches or pull requests
Pillow:
aggdraw:
The text was updated successfully, but these errors were encountered: