Skip to content

Instantly share code, notes, and snippets.

@zachleat
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zachleat/68611e730f6c2280e8c9 to your computer and use it in GitHub Desktop.
Save zachleat/68611e730f6c2280e8c9 to your computer and use it in GitHub Desktop.
WOFF2 Feature Test
var supportsWoff2 = (function( win ){
if( !( "FontFace" in win ) ) {
return false;
}
var f = new win.FontFace( "woff2test", 'url( "data:font/woff2;base64," ) format( "woff2" )' );
f.load();
return f.status == 'loading';
})( this );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment