Forum Replies Created

  • Amy Auman

    July 19, 2022 at 12:57 pm in reply to: Changing Font Weights with Sliders

    I tried this exact same expression, and I keep getting errors stating SyntaxError: Invalid or unexpected token, an expression was disabled as a result of an error. Any ideas on what’s going on?

    weights = [
    ‘Light’,
    ‘Regular’,
    ‘Bold’,
    ‘Ultra’,
    ‘Black’
    ];

    family = thisProperty.style.font;

    family = family.split(‘-‘);

    select = Math.floor(clamp(effect(“Select”)(“Slider”), 0, weights.length – 1));;

    createStyle().setFont(family[0] + ‘-‘ + weights[select]);

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy