-
-
Notifications
You must be signed in to change notification settings - Fork 384
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
Text wrapping #137
Comments
This is a rather complex request, and GD doesn't have anything built-in for it as far as I can tell. I would entertain a proper PR, but only if it doesn't bloat the library. Furthermore, I don't think this should be a feature of the |
Is there any update or progress about this request? |
I've learned a bit more about how bounding boxes are calculated by GD thanks to #164. It's definitely possible to determine if the text will overlap a defined width, but I'm not sure how well it will perform. The idea is:
Things to consider:
That said, I'm in the middle of another project at the moment and won't be able to tackle this right away. If anyone is interested in taking a stab at it, let me know! |
This would be a great feature to have! +1 |
This can be useful, it is not the best solution but it can work very well in many cases.
|
I am working on a function to do this. |
Manual line break is also supported.
|
Fantastic work! This looks amazing. 😍 I'll review the source tomorrow or the next day. Apologies for the delay! |
It would be a nice feature to make the text break in two lines if the available width is not enough for the text given and the font size or decrease automatically the font size in order to fit, but not under a specific limit (ex 8px) where it will break it in two lines.
Nevertheless is a really great library.
The text was updated successfully, but these errors were encountered: