Javascript 检测字体系列是否更改并显示对话框

Javascript 检测字体系列是否更改并显示对话框,javascript,html,css,Javascript,Html,Css,我已经写了一个HTML代码 我在CSS元素中使用自定义字体(gotham.otf),我想检测html是否使用我的自定义字体加载。如果html不是用我的自定义字体加载的,我必须显示自定义对话框 <body onload="myFunction()"> <script> function myFunction() { Here I have to check whether browser is loading with custom font or not,

我已经写了一个HTML代码

我在CSS元素中使用自定义字体(gotham.otf),我想检测html是否使用我的自定义字体加载。如果html不是用我的自定义字体加载的,我必须显示自定义对话框

 <body onload="myFunction()">
 <script>
 function myFunction()
  {
   Here I have to check whether browser is loading with custom font or not,If not show a dialog 
 confirm("Custom font may not work for some browsers!");
  }
  </script> 
  </body>

函数myFunction()
{
在这里,我必须检查浏览器是否加载自定义字体,如果不显示对话框
确认(“自定义字体可能不适用于某些浏览器!”);
}
如果这不可能通过这种方式,请建议我更好的方式来实现它

帮助总是值得感激的,
谢谢

Modernizer:应该能够检测到

谢谢,但我不能使用任何第三方库/文件。在javascript中使用Detector可以实现这一点吗?我使用的是HTML而不是HTML5。