Pillow icon indicating copy to clipboard operation
Pillow copied to clipboard

Support ttb multiline text

Open radarhere opened this issue 10 months ago • 1 comments

Resolves #4945

Currently,

from PIL import ImageFont, ImageDraw, Image

im = Image.new("RGB", (200, 200), "white")
draw = ImageDraw.Draw(im)
font = ImageFont.truetype("Tests/fonts/DejaVuSans/DejaVuSans.ttf", 24)
draw.text((100, 10), "abc\n123\nXYZ", "black", font, direction="ttb")
im.show()

gives

ValueError: ttb direction is unsupported for multiline text

This PR would instead generate out

radarhere avatar Feb 04 '25 09:02 radarhere

@nulano How does this look?

hugovk avatar Mar 29 '25 16:03 hugovk