-
style.setFont not working with toString
Hi,
I was trying something out by taking the rgb values from an image and changing the color of the text layer to that color. I am also taking the hex code of that color and displaying as text in the same text layer. But when I try to add other fonts using the setFont feature introduced in v17 it stays the same. I can still change the font from the character panel though.Any help is appreciated.
Thanks in advance
Ayushvar array = [
"Metropolis-Regular",
"Didot-Bold",
"Roboto-BoldCondensed"
];text.sourceText.style.setFont(array[1])
r = Math.round(text.animator("Animator 1").property.fillColor[0]*255).toString(16);
if (r.length < 2) r = "0" + r;
g = Math.round(text.animator("Animator 1").property.fillColor[1]*255).toString(16);
if (g.length < 2) g = "0" + g;
b = Math.round(text.animator("Animator 1").property.fillColor[2]*255).toString(16);
if (b.length < 2) b = "0" + b;'#' + r + g + b;