function cropImageFromCanvas(e,t){for(var n,i=e.canvas,l=i.width,a=i.height,o={x:[],y:[]},d=e.getImageData(0,0,i.width,i.height),s=0;s{const e=document.querySelector(".copyAlert:not(.animate)");e&&(e.classList.add("animate"),e.addEventListener("animationend",()=>e.classList.remove("animate")))};function pixelsNoWhite(e){var t=e.canvas,n=t.width,i=t.height,l=e.getImageData(0,0,1,i).data,a=e.getImageData(n-1,0,1,i).data;for(let e=0;e'+strCopy_glyph+'  ',"nope"!=t?(d=manualUnicode(t),s=(parsed_str_copy=t)!=e.name&&void 0!==e.name?'
 ('+e.name+")
":"",l.innerHTML='
'+t+"
"+s+'
'+d+"
"+r):e.unicodes.map(formatUnicode).length<2&&0!==e.unicodes.map(formatUnicode).length?(o="\\u"+e.unicodes.map(formatUnicode).join(", "),d=JSON.parse('"'+o+'"'),parsed_str_copy=JSON.parse('"'+o+'"'),0!=d.length&&"0020"!=e.unicodes.map(formatUnicode).join(", ")&&"0000"!=e.unicodes.map(formatUnicode).join(", ")&&"000D"!=e.unicodes.map(formatUnicode).join(", ")&&"F"!=i&&"E"!=i||(d=e.name),a="U+"+e.unicodes.map(formatUnicode).join(", "),s=d!=e.name&&void 0!==e.name?'
 ('+e.name+")
":"","0020"==e.unicodes.map(formatUnicode).join(", ")&&(r=""),l.innerHTML='
'+d+"
"+s+'
'+a+"
"+r):0!==e.unicodes.map(formatUnicode).length?(a="U+"+(d=(o=e.unicodes.map(formatUnicode).join(", ")).split(","))[0],o="\\u"+d[0],d=JSON.parse('"'+o+'"'),parsed_str_copy=JSON.parse('"'+o+'"'),s=d!=e.name&&void 0!==e.name?'
 ('+e.name+")
":"",(1
'+d+"
"+s+'
'+a+"
"+r):(r="",l.innerHTML='
'+e.name+"
"),""!=r?(l.innerHTML+='
',c=strCopied,document.getElementById("infoGlyph_copy").innerHTML='   ✓ '+c+""):(l.innerHTML+='
',c="",document.getElementById("infoGlyph_copy").innerHTML=''),e.getBoundingBox().x2,e.getBoundingBox().x1,e.advanceWidth,h.width,h.width,p.fillStyle="#000000",document.addEventListener("mouseup",function(e){for(var t=document.getElementById("glyph-full"),n=document.body,i=document.getElementsByClassName("item"),l=0;la.clientWidth-100?(i.style.top="5px",i.style.height="",i.style.marginRight="0px",d.style.flexDirection="column",d.style.gap="0px",s.style.position="absolute",s.style.marginTop="0px",t.style.marginLeft="0px",l.style.display="inline-block",l.style.height="",l.style.paddingRight="25px",l.style.overflow="",l.style.verticalAlign="bottom",l.style.marginBottom="3px",n.style.padding="0px",r.style.marginTop="15px",e.style.top="",e.style.float="none",o.style.borderLeft="none",o.style.height="auto",o.style.textAlign="center",Math.round(i.clientHeight+o.clientHeight)=font.numGlyphs||(c.fillStyle="#c8c8c8",c.font="18px sans-serif",void 0===n&&(n=".notdef"),a.unicodes.map(formatUnicode).length<2&&0!==a.unicodes.map(formatUnicode).length?(i="\\u"+a.unicodes.map(formatUnicode).join(", "),0!=(n=JSON.parse('"'+i+'"')).length&&"F"!=s&&"E"!=s&&"0020"!=a.unicodes.map(formatUnicode).join(", ")&&"0000"!=a.unicodes.map(formatUnicode).join(", ")&&"000D"!=a.unicodes.map(formatUnicode).join(", ")&&".notdef"!=n||(n=a.name),c.font="9px serif",l="U+"+a.unicodes.map(formatUnicode).join(", ")):0!==a.unicodes.map(formatUnicode).length?("0020"!=(l=(i=a.unicodes.map(formatUnicode).join(", ")).split(","))[0]&&"F"!=s&&"E"!=s&&"0000"!=l[0]&&"000D"!=l[0]&&".notdef"!=n||(n=a.name),l="U+"+l[0]):(l=manualUnicode(n),1'+n+"",r.innerHTML+='
'+l+"
",c.globalCompositeOperation="destination-over",c.fillStyle="#000000",a.draw(c,d,fontBaseline,fontSize),(a.leftSideBearingfontxMaxAdjust||900{e.className="p"+t.target.id.substr(1)+" charmapPage_button"}),document.querySelectorAll('div[id$="_div"]').forEach(e=>e.remove()),displayGlyphPage(+t.target.id.substr(1))}function displayGlyphPage(e){pageSelected=e,cellCount{e.className+=" page-selected"}):cellCount=font.numGlyphs;var t=document.getElementById("glyph-list-end"),n=t.parentElement,i=(pageSelected=e,cellCount,new Array),l=(glyphs=font.stringToGlyphs(chars),glyphs_min=font.stringToGlyphs(chars_min),new Array),l=font.stringToGlyphs(chars_num);if(glyphs_ponct=font.stringToGlyphs(chars_ponct),0===e){for(var a=0;a
",n.insertBefore(h,document.getElementById(p.id+"_div")));glyphs_min=new Array;for(a=0;a
",n.insertBefore(h,document.getElementById(p.id+"_div")));for(var l=new Array,s=0;s
",n.insertBefore(h,document.getElementById(p.id+"_div")));glyphs_ponct=new Array;for(var r=0;r
",n.insertBefore(h,document.getElementById(p.id+"_div")))}for(var g=0;gfont.numGlyphs?font.numGlyphs-m:cellCount;for(a=0;acellCount){n.style.marginBottom="12px",n.innerHTML="";for(var o=0;ofontxMax/2)&&(skipCroping=1),fontSideBearingAdjust=fontminSideBearing/3,fontxMaxAdjust=fontxMax/2,fontxMinAdjust=fontxMin/2,digits_exist=0,displayDigits=1,ponct_exist=0,accents_exist=0;var h=e.stringToGlyphs(chars_num),p=e.stringToGlyphs(chars_min),g=e.stringToGlyphs(chars),m=e.stringToGlyphs(chars_accents),y=e.stringToGlyphs(chars_ponct_basic),u=e.stringToGlyphs(chars_currencies),f=(digits_values=new Array,new Array),x=new Array,v=new Array,_=new Array,E=new Array,n=t=>t.every(e=>e===t[0]);function w(e){var t=new Set(e);return e.length!==t.size}glyphValues=new Array;for(o=0;o{document.getElementById("glyph").getContext("2d",{willReadFrequently:!0});resizeGlyphFull()}),displayGlyph(t,i),resizeGlyphFull())}}function increaseCellWidth(){cellWidth=120,cellMargin=0;var e=(glyph.getBoundingBox().x2-glyph.getBoundingBox().x1)*fontScale;if(e>cellWidth-cellMargin)for(;e>cellWidth-cellMargin&&!(ee.charCodeAt(0)));return new TextDecoder("utf-8").decode(e)}var pageSelected,fontScale,fontSize,fontBaseline,glyphScale,glyphSize,glyphBaseline,chars=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],chars_min=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],chars_num=["0","1","2","3","4","5","6","7","8","9"],chars_ponct=["$","¢","€","£","¥","¤","+","-","*","/","÷","=","%","‰",'"',"'","#","@","&","_","(",")",",",".",";",":","¿","?","¡","!","\\","|","{","}","<",">","[","]","§","¶","µ","`","^","~","©","®","™"],textToRender=(chars_accents=chars_accents.map(fixLatin1ToUtf8),""),font=null;opentype.load(fontFileName,function(e,t){var n;e?(showErrorMessage(fontFileName),showErrorMessage(strCharacter_set_unavailable),n=!1,window.XMLHttpRequest?n=new XMLHttpRequest:window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLHTTP")),n&&(n.open("POST","update-font-charmap-pb.php",!0),n.onreadystatechange=function(){4==n.readyState&&n.status},n.setRequestHeader("Content-type","application/x-www-form-urlencoded"),n.send("font_id="+font_id+"&nb_init="+current_nb_init+"&message="+e.toString()))):onFontLoaded(t)},{lowMemory:!0});