-
-
Notifications
You must be signed in to change notification settings - Fork 306
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
Add basic word wrapping #1819
Add basic word wrapping #1819
Conversation
I think this could be nice with |
Tests only failed because there is no refimage for new test |
Hi, I have implemented the same feature here (although in a hacky way) https:/fatteneder/MakieSlides.jl The reference image you added already goes into the same direction with what I want to do. So I very much support this PR for |
Funnily enough I also worked on this for presentations. Though I didn't end up using it myself. This is my attempt: https:/ffreyer/MakiePresentation.jl It requires #1818 |
That's funny. If you want we can join forces :) |
For the next 2 weeks I want to keep my package (more or less) as is because I have a presentarion planned with it and I don't want to break it. After that I'd be happy to merge them. |
All test errors are because of the missing refimg for the new test, so this is ready to be merged again |
* add basic word wrapping * add refimg test * dd NEWS entry * update docs * add word_wrap to Label * test Label with word wrapping * update word_wrap NEWS entry * fix test * move word wrapping to glyph collection constructors * fix wrap position and update test * only wrap with positive wrap width * fix dropped space * fix wrapping at string end * fix number of arguments * tighten test settings Co-authored-by: Simon <[email protected]>
Description
This adds
word_wrap_width
as an attribute for text, which sets a limit for the size of a line. If a word (currently anything between two spaces with no newline in between) overflows this limit, a newline is inserted before it to wrap it to the next line.Example (which is also the test I added):
Type of change
Checklist