-
Font size and leading expression
Hi guys, I’m having some issues with a code.
I set up a code that controls font size and leading size with 2 sliders.
The problem that it works only on one of them. If I place the font size at the bottom it’s the one that works. And if I put the leading one at the bottom it’s the one that works. Please help!var x = effect(“font-size”)(“Slider”).value;
var y = effect(“line-space”)(“Slider”).value;
if ( x == 2) {style.setFontSize(50)}else {style.setFontSize(100)};
if ( y == 1) {style.setLeading(100)}else {style.setLeading(50)};