Try this: http://jsbin.com/litava/3/edit
The following code should work. I suggest you really should be using Modernizr as they test their implementation properly, and they maintain it.
// supportsFontFace released to public domain by Robocat. Thanks are also due to Modernizr and the number 9
function supportsFontFace() {
function blacklist() {
var match = /(WebKit|windows phone.+trident)\/(\d+)/i.exec(navigator.userAgent);
return match && parseInt(match[2], 10) < (match[1] == 'WebKit' ? 533 : 6);
}
function hasFontFaceSrc() {
var style = document.getElementById('fontsupporttest');
var sheet = style.sheet || style.styleSheet;
var cssText = sheet ? (sheet.cssRules && sheet.cssRules[0] ? sheet.cssRules[0].cssText : sheet.cssText || '') : '';
return /src/i.test(cssText);
}
return !blacklist() && hasFontFaceSrc();
}
And add the following style:
<style id=fontsupporttest>@font-face{font-family:"font";src:url("https://")}</style>
I rewrote it so it doesn't have any copyright issues, and simplified it a little that makes it blacklist less conservatively (doesn't support any webkit below 523 which also prevents webos, doesn't support windows phone < 8, and doesn't support browser prefixed font-face like -webkit-font-face).