Oct 24 2010 | 5:38 pm
Is there an efficient way to enable text wrapping in either jit.lcd or jit.gl.text2d? At the moment, any text entered remains on a single line. The jit.gl.text2d example patch shows a jit.noise object generating random values within defined dimensions, but I'm not sure how to carry that over into a straight text situation.
Also, for 'write [text]' and 'text [text]' messages, are there any symbols for paragraph marks, etc.?
Thanks for reading,
- efeOct 24 2010 | 7:30 pmI am having the issue of lacking multiple lines with text2d, any idea what can be a solution?
- demersNov 28 2010 | 3:08 amHello all,No answer has been given on this. Is it a tough one to solve, or is the answer too obvious? Either way, if anyone has thoughts, I'm all ears - and still looking for a solution.
- Samuel FreemanNov 28 2010 | 10:59 pmsome moves towards a possible solution:
- semiaddictFeb 01 2012 | 9:43 pmHi,I know this is an old post, but I'm wondering if anyone has gone further on this issue.Thank you.
- WetterbergFeb 02 2012 | 8:02 am
- semiaddictFeb 04 2012 | 9:43 amThank you @Dobrian & @11olsen. I'll look into those solutions and see what fits.
- RodrigoJan 29 2018 | 9:25 pmDon't know if it's the newer forum software, but I can't see the .js file in @Christopher's post. Can anyone re-upload it?
- 11OLSENJan 29 2018 | 10:19 pm@RODRIGOhttps://cycling74-web-assets.s3.amazonaws.com/bb-attachments/3303.LineBreakerCD.jsBut I think the "counting chars" method is only useful with a monospace font. Other fonts have varying sizes of characters. (e.g. .......... __________ 10 dots are shorter than 10 underscores)
- RodrigoJan 29 2018 | 11:10 pmThanks @Olsen!I'll have a poke at it. I plan on using Helvetica, which isn't monospace, but doesn't vary too wildly.I'll mainly try to get rid of the 30ms delay between each character though, as I primarily want to use this as a text wrapper that segments in whitespace only.
- 11OLSENJan 29 2018 | 11:40 pmWhen I had to wrap text, i always used a jsui. You don't need to display the text with it. You can print the wrapped lines to an outlet if you want. [my textarea link from above], https://cycling74.com/forums/jsui-mgraphics-patch-a-day
- RodrigoJan 30 2018 | 12:01 amI saw that while searching the forum and will have another look.My specific use case will be projecting the text, so primarily using jit.gl.text2d
- 11OLSENJan 30 2018 | 1:01 amThe line_length attribute of jit.gl.text2d does the wrapping at whitespaces.
- RodrigoJan 30 2018 | 9:21 amHah, well that makes my life much easier!Thanks!!