forked from RoelN/font-face-render-check
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fontfacecheck-min.js
executable file
·1 lines (1 loc) · 2.17 KB
/
fontfacecheck-min.js
1
var fontFaceCheck=new function(){var h=document,g=h.body||h.documentElement.appendChild(h.createElement("fontface")),i=h.createElement("span"),d=h.createElement("style"),f=5,e=20,c,b=(function(){var l,j=3,m=h.createElement("div"),k=m.getElementsByTagName("i");while(m.innerHTML="<!--[if gt IE "+(++j)+"]><i></i><![endif]-->",k[0]){}return j>4?j:l}()),a=function(j,k){c=(i.offsetWidth/Math.max(1,i.offsetHeight))>=5;if(!c&&e-->0){setTimeout(function(){a(j,k)},f);return}g.removeChild(i);if(k){k(c)}else{h.getElementsByTagName("html")[0].className+=c?" fontfacerender":" no-fontfacerender"}};this.support=function(k,l){k=k||"./";i.setAttribute("style","font-family:pixelambacht !important;position:fixed;visibility:hidden");i.innerHTML="-";g.appendChild(i);d.type="text/css";h.getElementsByTagName("head")[0].appendChild(d);if(b<=8){var j=new XMLHttpRequest();j.open("GET",k+"pixelambacht.eot",false);j.send(null);d.styleSheet.cssText="@font-face{font-family:pixelambacht;src:url('"+k+"pixelambacht.eot');}"}else{d.textContent="@font-face{font-family:pixelambacht;src:url(data:font/truetype;base64,AAEAAAALAIAAAwAwT1MvMghABuMAAAC8AAAAYGNtYXAAlQDaAAABHAAAAGRnYXNw//8ABAAAAYAAAAAIZ2x5Zv8nt3kAAAGIAAAATGhlYWQQRDZ2AAAB1AAAADZoaGVhFeIT5AAAAgwAAAAkaG10eBUAAAAAAAIwAAAADGxvY2EAEAAmAAACPAAAAAhtYXhwAAUAEwAAAkQAAAAgbmFtZf0RHiMAAAJkAAAAwHBvc3QAAwAAAAADJAAAACAAAwIAAZAABQAAAUwBZgAAAEcBTAFmAAAA9QAZAIQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAACAALQHg/+D/4AHgACAAAAAAAAAAAAAAAAAAAAAgAAAAAAACAAAAAwAAAB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