Font Scaler

  1. 6 years ago
    Edited 6 years ago by Brigette M

    I'm making an eReader style app and I am working on the font scaling.
    Is there a way to implement a user slider or button that scales up and down the font size. I've tried using Javascript for the slider however it does not show at all in the smart object.
    I also need the font size to stay as they move page to page.

    I've also tried to use scripting and all that scales is the line height.
    <script>
    $("#obj2839").on('click', function () {
    $("#obj1157").animate({'font-size': '+=5'});
    });

    $("#obj2937").on('click', function () {
    $("#obj1157").animate({'font-size': '-=5'});
    });</script>

  2. Angelo S

    7 Nov 2017 Administrator

    hello Brigette,
    probably your font size definitions reside inside spans of text and is not applied to the entire box.
    Two solutions: one is to define font size for the entire box (using the selection inspector) and do not alter it inside the box; the second is altering spans font size using something like $("#obj1157 span").animate({'font-size': '+=5'});

 

or Sign Up to reply!