[ANSWERED] Text scaling & formatting for dynamic content
-
Is there any way for Isadora to dynamically change the size and or formatting/wrapping of text based on the length of a line of text?
I've built a simple patch that using an array actor that sends a line of haiku to 3 seperate text draw actors. The aim being that the .txt document that it is based on can be updated dynamically as new lines of text are entered. Of course the number of characters will vary a bit.
Im looking for a way to calculate the optimum text formatting for a size limited "circular text zone" preferably by adding a 'carriage return'. but could be through reducing text size.

Can this be done?
I am still on Izzy 3, using Mac Studio and/0r early M1 Mac book pro.Thanks
J1M
-
I am not sure to understand exactly what you want but if it is something like that:

you only need to set "bounds width" and "bounds height" in the Text draw actor to limit the text to a square inside the circle and then choose the correct text size. If you need or want to change the text size for each new text you can add the size for each text in your file (after the text with a tab before) (Extract from the actor description: "The data may be stored on disk in a standard, tab-separated text file"). In the Data array actor you add a second value and link this second value to the font size of the Text draw actor. It will change with each new line.

Best regards,
Jean-François
-
@jfg that's a really clever solution actually.
-
-
@video-architect said:
I am still on Izzy 3
My bad, here's one you can actually use with Isadora 3: text-draw-aware-of-text-wrapping.iua3
Basically the "measure mode" input is the key
-
@video-architect said:
preferably by adding a 'carriage return'. but could be through reducing text size.
Also both of these could be accomplished programatically with some logic.
Additionally, if the text is known ahead of time and you want to avoid seeing the adjustments being made live, you could have two Stages with one of the Stages being what you're sending to the video output, and the second Stage being a Virtual Stage where the adjustments happen to what will be the next piece of text shown. The adjustments made to the second (non-visible) Stage can then be written to the text file with the Data Array actor so that the numbers and text are already corrected for when the Data Array actor hooked up to the real output Stage moves on to show that text.
-
@woland + @Skulpture + @jfg
Thanks guys
There's plenty to work with in all your suggestions. @jfg exactly what I am trying to achieve.
:-)
J1M