Skip to content
New issue

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

Support ttb multiline text #8730

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

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
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
1 participant