test/google_fontface_test.js
// a TTF file name which should satisfy the standard format 'Name-WeightStyle'.
a TTF file name which should satisfy the standard format 'Name-WeightStyle'.
a TTF file name which should satisfy the standard format ' Name - WeightStyle ' .
function extract(test, filename) {
        const results = refont.exec(path.basename(unixifyPath(filename)));
        if (results === null || results.length < 2) {
            test.ok(false, `The name of the TTF file '${filename}' is not standard`);
            return;
        }
        return { 
            family: results[1], 
            weight: weights[results[2]] ? weights[results[2]]: 400,
            style: results[3] !== undefined ? results[3].toLowerCase() : 'normal'
        };
    }
function extract ( test , filename ) { const results = refont . exec ( path . basename ( unixifyPath ( filename ) ) ) ; if ( results === null || results . length < 2 ) { test . ok ( false , ` ${ filename } ` ) ; return ; } return { family : results [ 1 ] , weight : weights [ results [ 2 ] ] ? weights [ results [ 2 ] ] : 400 , style : results [ 3 ] !== undefined ? results [ 3 ] . toLowerCase ( ) : 'normal' } ; }
a TTF file name which should satisfy the standard format 'Name-WeightStyle'.
a TTF file name which should satisfy the standard format ' Name - WeightStyle ' .