Skip to content

Conversation

@JaniM
Copy link
Contributor

@JaniM JaniM commented Jan 13, 2025

Expands on top of #883, that should be merged first. This PR only adds the latest commit so review should focus on that.

This change adds a new function, measure_multiline_text and updates draw_multiline_text to return the dimensions. I expanded the text_wrap example to show its results.

Should solve #870.

@JaniM JaniM force-pushed the push-wunzvnrqtykv branch from 161164d to a7c5d7f Compare January 13, 2025 10:58
@JaniM JaniM force-pushed the push-wunzvnrqtykv branch from a7c5d7f to 60830fc Compare January 13, 2025 17:54
@amatgil
Copy link

amatgil commented Aug 24, 2025

Are there any issues blocking this PR? (I'd be happy to fix them)

I've come across the exact same situation: draw_text has its measure_text counterpart, but draw_multiline_text does not have measure_multiline_text (and it doesn't return the dimensions, like measure_text does).

(It could be implementable by the user, I think, but the font attribute in Font is private so, the font's vertical spacing is inaccessible afaict)

@not-fl3
Copy link
Owner

not-fl3 commented Aug 25, 2025

@amatgil could you please rebase it? I'll merge it right away

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.

3 participants