instiki/public/MathJax/jax/output/HTML-CSS/imageFonts.js

19 lines
3.8 KiB
JavaScript
Raw Normal View History

/*
* ../SourceForge/trunk/mathjax/jax/output/HTML-CSS/imageFonts.js
*
* Copyright (c) 2010 Design Science, Inc.
*
* Part of the MathJax library.
* See http://www.mathjax.org for details.
*
* Licensed under the Apache License, Version 2.0;
* you may not use this file except in compliance with the License.
*
* http://www.apache.org/licenses/LICENSE-2.0
*/
MathJax.Unpack([
['(','function(','b,c,a){var d="1.0";b.Register.LoadHook(c.fontDir+"/fontdata.js",','function(){','c.Augment({allowWebFonts:false,imgDir:c.webfontDir+"/png",imgPacked:(','MathJax.','isPacked||','c.config.useOldImageData','?"":"/unpacked"),imgSize:["050","060","071","085",100,120,141,168,200,238,283,336,400,476],imgBaseIndex:4,imgSizeForEm:{},imgSizeForScale:{},handleImg:',1,'t,i,r,h,u){if(u.length){this.addText(t,u)}var s=r[5].orig;if(!s){s=r[5].orig=[r[0],r[1],r[2],r[3],r[4]]}var m=this.imgBrowserZoom();if(!t.scale){t.scale=1}var p=this.imgIndex(t.scale*m);if(p==','this.imgEmWidth','.length-1&&this.em*t.scale*m/',11,'[p]>1.1){m=',11,'[p]/(this.em','*t.scale)}var q=',11,16,'*(t.scale||1)*m);r[0]=s[0]*q;r[1]=s[1]*q;r[2]=s[2]*q;r[3]=s[3]*q;r[4]=s[4]*q;var k=this.imgDir+"/"+i.directory+"/"+this.imgSize[p];var l=h.toString(16).toUpperCase();while(l.length<4){l="0"+l}var j=k+"/"+l+".png";var o=r[5].img[p];var g={width:','Math.floor','(o[0',']/m+0.5)+"px','",height:',21,'(o[1',23,'"};if(o[2]){g.verticalAlign=',21,'(-o[2',23,'"}if(r[3]<0){g.marginLeft=this.Em(r[3]/1000)}if(r[4]!=r[2]){g.marginRight=this.Em((r[2]-r[4])/1000)}if(this.msieIE6){g.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'"+a.fileURL(j)+"\', sizingMethod=\'scale\')";j=this.directory+"/blank.gif"}this','.addElement(','t,"img",{src:a.fileURL(j),style:g});return""},defineImageData:',1,'i){for(var g in i){if(i','.hasOwnProperty(','g)){','var h=c.FONTDATA.FONTS','[g];if(h){g=i[g];for(var j in g){if(g',37,'j)&&h[j]){h[j][5]={img:g[j]}}}}}}},initImg:',1,'j){if(','this.imgSizeForEm[this.em',']){','this.imgBaseIndex','=',45,']}for(var h=0,g=',11,'.length-1;h<g;h++){if(','this.em<=',11,'[h]){break}}if(h&&',11,'[h]-this.em>this.em-',11,'[h-1]){h--}',45,']=',47,'=h},imgIndex:',1,'k){if(!k){','return ',47,'}if(!','this.imgSizeForScale[this.em',']){',69,']={}}if(',69,'][k]){',66,69,'][k]}','var j=this.','em*k;for(var h=0,g=',11,52,'j<=',11,'[h]){break}}if(h&&',11,'[h]-j>j-',11,'[h-1]){h--}',69,'][k]=h;',66,'h},','imgBrowserZoom:function(){',66,'1}});b.Browser.Select({Firefox:',1,'h){var g=c',33,'document.body',',"div",{style:{','display:"none",visibility:"hidden",overflow:"scroll",','position:"absolute",','top:0,left:0,width:"200px",height:"200px"}});var i=c',33,'g',100,102,'left:0,top:0,right:0,bottom:0}});','c.Augment({imgSpaceBug:true,imgSpace:String.fromCharCode(160','),','imgZoomLevel',':(h.isMac?{50:0.3,30:0.5,22:0.67,19:0.8,16:0.9,15:1,13:1.1,12:1.2,11:1.33,10:1.5,9:1.7,7:2,6:2.4,5:3,0:15}:{56:0.3,34:0.5,25:0.67,21:0.8,19:0.9,17:1,15:1.1,14:1.2,13:1.33,11:1.5,10:1.7,8:2,7:2.4,6:3,0:17}),imgZoomDiv:g,',93,78,111,';','g.style.display','="";var k=(g.offsetWidth-i.offsetWidth);k=(j[k]?j[k]:j[0]/k);',117,'="none";',66,'k}})},Safari:',1,'g){c.Augment({',93,66,'3}})},Chrome:',1,124,'imgHeightBug:true,',93,66,'3}})},Opera:',1,'g){',109,')+String.fromCharCode(160),imgDoc:(document.compatMode=="BackCompat"?',99,':document.documentElement),',93,'if(g.isMac){',66,'3}var h=','this.imgDoc.','clientHeight,i=',21,'(15*h/','window.innerHeight',');if(',144,'clientWidth<',144,'scrollWidth-i){h+=i}',66,'parseFloat((',148,'/h).toFixed(1))}})}});var f=',3,39,'.MathJax_Main[8212][5].img;c.imgEmWidth=[];for(var j=0,g=h.length;j<g;j++){c.imgEmWidth[j]=h[j][0]}};var e=c.imgDir+c.imgPacked;if(',7,'){e=c.webfontDir}',5,'Callback.Queue(["Require",a,e+"/imagedata.js"],f,["loadComplete",a,c.directory+"/imageFonts.js"])})})(',5,'Hub,',5,'OutputJax["HTML-CSS"],',5,'Ajax);']
]);