This will resize as you adjust the box but the arbitary scale factor at the end
seems to vary depending on letter size (i vs o) as Ron mentions.
So it's probably worth breaking it out as a new knob
(box.r-box.x)/[string length [value message]]*2
Howard
>________________________________
> From: Ron Ganbar <[email protected]>
>To: Nuke user discussion <[email protected]>
>Sent: Tuesday, 5 March 2013, 8:26
>Subject: Re: [Nuke-users] Automatically control Text size
>
>
>Hi Holger,
>thanks for this.
>I've been using this for a while now, but it quickly becomes apparent that a
>word with a lot of 'l's and 'i's will need to be bigger than a word with a lot
>of 'o's and 'c's.
>
>
>
>Thanks,
>Ron Ganbar
>email: [email protected]
>tel: +44 (0)7968 007 309 [UK]
> +972 (0)54 255 9765 [Israel]
>url: http://ronganbar.wordpress.com/
>
>
>On 5 March 2013 05:17, Richard Bobo <[email protected]> wrote:
>
>Hi Holger,
>>
>>
>>I've been trying out your suggestion and I am wondering where the number 5000
>>came from? Is it somehow related to the project's full size format setting or
>>something else…?
>>
>>
>>Thanks,
>>Rich
>>
>>
>>Rich Bobo
>>Senior VFX Compositor
>>Armstrong-White
>>http://armstrong-white.com/
>>
>>
>>Email: [email protected]
>>Mobile: (248) 840-2665
>>Web: http://richbobo.com/
>>
>>
>>"Your beliefs become your thoughts. Your thoughts become your words. Your
>>words become your actions. Your actions become your habits. Your habits
>>become your values. Your values become your destiny."
>>
>>
>>- Mahatma Ghandi
>>
>>
>>
>>On Mar 4, 2013, at 5:05 PM, Holger Hummel|Celluloid VFX
>><[email protected]> wrote:
>>
>>hi Ron,
>>>
>>>not 100% exactly what you're looking for, i guess, but maybe a
starting point.
>>>put this expression into the size knob of the Text node:
>>>
>>>5000/[string length [value message]]
>>>
>>>works ok for one-liners (sometimes needs an additional whitespace
at the end).
>>>needs a bit of playing with the value that suits your needs best
instead of '5000'.
>>>and, of course, if you have line breaks in your text that makes
things more difficult.
>>>in the worst case maybe you'd need a python function to return the
size value based
>>>on more factors than just the number of characters.
>>>
>>>cheers,
>>>Holger
>>>
>>>
>>>Am 04.03.2013 22:02, schrieb Ron Ganbar:
>>>
>>>That would be good. Yes.
>>>>The only way I can think to do this is by calling up the bounding box
>>>>(don't confuse this with the Text node's box property, I mean the dotted
>>>>line bounding box - the proverbial DOD) but that creates a feedback loop
>>>>currently, it seems.
>>>>
>>>>
>>>>
>>>>Ron Ganbar
>>>>email: [email protected]
>>>>tel: +44 (0)7968 007 309 [UK]
>>>> +972 (0)54 255 9765 [Israel]
>>>>url: http://ronganbar.wordpress.com/
>>>>
>>>>
>>>>On 4 March 2013 22:57, Rich Bobo <[email protected]> wrote:
>>>>
>>>>Ron,
>>>>>
>>>>>
>>>>>I'd love that, too. And, I'd add the ability for it to scale up to fit.
>>>>>Essentially, a scale-to-fit would be great…
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>Rich
>>>>>
>>>>>
>>>>>Rich Bobo
>>>>>Senior VFX Compositor
>>>>>Armstrong-Whitehttp://armstrong-white.com/
>>>>>
>>>>>
>>>>>Email: [email protected]
>>>>>Mobile: (248) 840-2665Web: http://richbobo.com/
>>>>>
>>>>>
>>>>>"What you can do, or dream you can do, begin it; boldness has genius,
>>>>>power and magic in it."
>>>>>- Johann von Goethe
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>On Mar 4, 2013, at 3:03 PM, Ron Ganbar <[email protected]> wrote:
>>>>>
>>>>>Hi guys,
>>>>>>can anyone think of a way to automatically control the font size of text
>>>>>>in the Text node so a line of text always remains in the text box?
>>>>>>At the moment, if some text is longer than the box it splits itself up
>>>>>>and continues in another line. I want the text to become smaller instead.
>>>>>>
>>>>>>Any ideas?
>>>>>>
>>>>>>Ron Ganbar
>>>>>>email: [email protected]
>>>>>>tel: +44 (0)7968 007 309 [UK]
>>>>>> +972 (0)54 255 9765 [Israel]
>>>>>>url: http://ronganbar.wordpress.com/
_______________________________________________
>>>>>>Nuke-users mailing list
>>>>>>[email protected], http://forums.thefoundry.co.uk/
>>>>>>http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>>>>>
>>>>>_______________________________________________
>>>>>Nuke-users mailing list
>>>>>[email protected], http://forums.thefoundry.co.uk/
>>>>>http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>>>>>
>>>>
>>>>
>>>>
>>>>_______________________________________________
Nuke-users mailing list [email protected],
http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>>>
_______________________________________________
>>>Nuke-users mailing list
>>>[email protected], http://forums.thefoundry.co.uk/
>>>http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>>
>>_______________________________________________
>>Nuke-users mailing list
>>[email protected], http://forums.thefoundry.co.uk/
>>http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>>
>
>_______________________________________________
>Nuke-users mailing list
>[email protected], http://forums.thefoundry.co.uk/
>http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>
>_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users