November 18, 2011, 12:52pm
Hello VVVV users!
Does anybody know an easy way to define the maximum width of a text line
I saw the PAD node, but it only limits the maximum length of a string with the number of letters…
I want that if a string is longer than a certain width (in pixels or else) it should cut away the rest.
Thanks in advance!
November 18, 2011, 1:51pm
The key node you should use is WordWrap.
I made a little example
ConstrainText.v4p (5.1 kB)
November 18, 2011, 2:04pm
Thank you sunep for your help! :)
But how can I do the same for more lines? How can I know
which line is to keep and which to skip if I have a spread of strings?
November 18, 2011, 3:24pm
I would know how to do that, but another problem with wordwrap is, that it doesn’t cut letters, only words…
So, if I have a very long word which goes outside the pixellength in wordwrap, then it doesn’t cut away!
November 20, 2011, 2:15am
The dirty way could be, just add extra spaces, do the wordwrap, and remove those extra spaces. But to be honest, that does not result in readable words, vvvv is not a text processor with a dictionary that knows where to cut words.
But yes, I would like to have an extra pin for the wordwrap node to cut on the letter, or on the word.
ConstrainText2.v4p (14.8 kB)
November 20, 2011, 1:55pm
line break by letters without dummy characters:
ConstrainText3.v4p (13.3 kB)
November 20, 2011, 10:24pm
Thank you again for the Lesson Woei, integral, mod and differential… cool.
And I actualy understand what you did!! :)
November 22, 2011, 9:15pm
thank you very much for your help!