| Project: | Textimage |
| Version: | 5.x-2.0-beta |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | wundo |
| Status: | closed (fixed) |
Issue Summary
The attached patch implements text wrapping support for textimage. Each preset now has a "maximum width" option which can be enforced (when set to non-zero/non-empty). The wrapping algorithm is Unicode-aware and will correctly deal with hyphens and punctuation, as well as words longer than the available space (they are truncated).
Existing presets default to unwrapped.
I also cleaned up that whole ugly defaults assignment code and replaced it with a neat array + assignment loop.
Note: it seems the version in CVS has mixed up line-endings or something, because I can't edit it without causing random extra chunks to show up in the patch. The attached patch is between my versions and the original, but after cleaning up the line-endings.
| Attachment | Size |
|---|---|
| wrapping.patch | 7.79 KB |
Comments
#1
Here's a patch against the current CVS version. The only difference with the one above is that it changes the line endings to be consistent.
#2
Sorry, I didn't test backgrounds. The inconsistency in variable naming is a bit annoying there. It now correctly maps ['text']['color'] to $color, but ['background']['color'] to $back_color.
Here is an updated 'differences only' patch.
#3
Here is an updated patch against current CVS HEAD.
#4
As I said to you in PM, I was working in this feature, here is the patch I have (ignoring line endings)...
It's not ready for release yet, but is something ;)
#5
commited
#6
#7
Any plans of committing this to the 5.x branch as well?
#8