diff --git a/lib/jquery.webfonts.js b/lib/jquery.webfonts.js index c28df958..d205dee1 100644 --- a/lib/jquery.webfonts.js +++ b/lib/jquery.webfonts.js @@ -308,6 +308,7 @@ return item.replace( /[\s'"]/g, '' ); } ); fontFamily = fontFamily.replace( /[\s'"]/g, '' ); + return $.inArray( fontFamily, overridableFontFamilies ) >= 0; }, @@ -422,6 +423,11 @@ fontFaceRule += 'local(\'' + fontFamily + '\'),'; } + if ( fontconfig.woff2 ) { + fontFormats.push( '\t\turl(\'' + base + fontconfig.woff2 + versionSuffix + + '\') format(\'woff2\')' ); + } + if ( fontconfig.woff ) { fontFormats.push( '\t\turl(\'' + base + fontconfig.woff + versionSuffix + '\') format(\'woff\')' );