Copy link to clipboard
Copied
Hello everyone, I've been working on some templates and as I'm going through all the small bits and pieces I came across an issue that I haven't been able to fix.
I have a text file with expressions that will (based on a checkbox) use two different fonts - This part is working fine
I also have an expression to set the leading to a specific size based on our design guidelines - This is also working fine.
But when I have both of them, only one is working properly. I've tried changing the place of the variables and so far, no luck... so any pointers or help on how to write more than one expression and having them both working would be really apreciated
here's my code:
Text leading -
txsz=thisComp.layer("Text").text.sourceText.style.fontSize; setLead = txsz*1.1; text.sourceText.style.setLeading(setLead);
Text font -
Copy link to clipboard
Copied
Does this work - for the last line?
style.setLeading(setLead).text.sourceText
Copy link to clipboard
Copied
Here's the final code that I used and it's working fine. I just had to add more styles to each option which I completely forgot you could do it 😉