Skip to content

Conversation

@radarhere
Copy link
Member

@radarhere radarhere commented Feb 4, 2025

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 radarhere requested a review from nulano February 4, 2025 09:49
@radarhere radarhere force-pushed the ttb branch 2 times, most recently from 316dc9d to b86f622 Compare February 4, 2025 10:08
@hugovk
Copy link
Member

hugovk commented Mar 29, 2025

@nulano How does this look?

@hugovk hugovk merged commit 1448902 into python-pillow:main Jun 28, 2025
57 checks passed
@radarhere radarhere deleted the ttb branch June 28, 2025 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multiline ttb text is not supported

2 participants