-
Modifying the text style per line using expressions?
Is there a way to change the text properties (size, bold, leading, etc) within a text object on a line by line basis?
I’m making a project which uses a lot of text on screen (not astons, but animated text), and I’ll need to localise it for several languages.
Using this forum page: https://forums.creativecow.net/thread/227/15319 I’ve managed to create a text file with my localised text in it, like this:
txt = [];
txt[0] = "Bonjour";
txt[1] = "Pomme";
txt[2] = "Lapin";I can insert a line of text into a text object using an expression like this:
myPath = "/D/somepath/text.txt";
$.evalFile (myPath);
txt[0];Which would display “Bonjour” inside my text object.
But what if I have a text object where I want the first line to be Bold and 32 point, and the second line to be Regular and 16 point text?
I know I can display two lines of my text file using this code:
myPath = "/D/somepath/text.txt";
$.evalFile (myPath);
txt[1] + "\r" + txt[2];But how would I change the text properties of each line, without duplicating the object?
Many thanks!