ker/mod/tfw.font-loader.js
function fallback( fonts ) {
    return new Promise(function (resolve, reject) {
        var divs = [];
        var body = document.body;
        fonts.forEach(function (font) {
            var div = document.createElement( 'div' );
            div.className = 'tfw-font-loader';
            div.style.fontFamily = font;
            body.appendChild( div );
        });
        // Ugly trick: juste wait 1.5 second.
        window.setTimeout(function () {
            divs.forEach(function (d) {
                body.removeChild( d );
            });
            resolve( fonts );
        }, 1500);
    });
}
function fallback( fonts ) {
    return new Promise(function (resolve, reject) {
        var divs = [];
        var body = document.body;
        fonts.forEach(function (font) {
            var div = document.createElement( 'div' );
            div.className = 'tfw-font-loader';
            div.style.fontFamily = font;
            body.appendChild( div );
        });
        // Ugly trick: juste wait 1.5 second.
        window.setTimeout(function () {
            divs.forEach(function (d) {
                body.removeChild( d );
            });
            resolve( fonts );
        }, 1500);
    });
}
function fallback ( fonts ) { return new Promise ( function ( resolve , reject ) { var divs = [ ] ; var body = document . body ; fonts . forEach ( function ( font ) { var div = document . createElement ( 'div' ) ; div . className = 'tfw-font-loader' ; div . style . fontFamily = font ; body . appendChild ( div ) ; } ) ; // Ugly trick: juste wait 1.5 second. window . setTimeout ( function ( ) { divs . forEach ( function ( d ) { body . removeChild ( d ) ; } ) ; resolve ( fonts ) ; } , 1500 ) ; } ) ; }
For old browsers, use a not-always-working trick.
For old browsers use a not - always - working trick .