-
Source Text Expressions
Hi all,
I am trying to combine several text-specific expressions, but I can only get 1 to work.
Depending on the layout, the 2nd one will always override the first.
I have tried the if/else expression and the substring, but none seem to work together.
The first expression is a character limit.
The second is a “source text style”, driven by sliders and checkboxes.
I don’t know if I am missing something or if there is an issue with them working together.
Any guidance on this would be very helpful.
l = text.sourceText.length;
if (l>25) {
“MAX LENGTH EXCEEDED”
} else {
text.sourceText;
}
var array=[
“Worker-ExtraBold”,
“Worker-Regular”,
]
text.sourceText.style
.setFontSize(thisComp.layer(“CTRL”).effect(“Font Size”)(“Slider”))
.setFont(array[thisComp.layer(“CTRL”).effect(“Font Select”)(“Slider”)])