@daiyam/xterm-tab-addon-ligatures
Version:
Add support for programming ligatures to xterm.js
17 lines • 177 kB
JavaScript
/**
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
* @license MIT
*
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
* @license MIT
*
* Originally forked from (with the author's permission):
* Fabrice Bellard's javascript vt100 for jslinux:
* http://bellard.org/jslinux/
* Copyright (c) 2011 Fabrice Bellard
*/
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
var Po=Object.create;var _n=Object.defineProperty;var Go=Object.getOwnPropertyDescriptor;var No=Object.getOwnPropertyNames;var Ho=Object.getPrototypeOf,_o=Object.prototype.hasOwnProperty;var tt=(s=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(s,{get:(f,p)=>(typeof require<"u"?require:f)[p]}):s)(function(s){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+s+'" is not supported')});var Ur=(s,f)=>()=>(f||s((f={exports:{}}).exports,f),f.exports);var zo=(s,f,p,h)=>{if(f&&typeof f=="object"||typeof f=="function")for(let v of No(f))!_o.call(s,v)&&v!==p&&_n(s,v,{get:()=>f[v],enumerable:!(h=Go(f,v))||h.enumerable});return s};var Wo=(s,f,p)=>(p=s!=null?Po(Ho(s)):{},zo(f||!s||!s.__esModule?_n(p,"default",{value:s,enumerable:!0}):p,s));var Wn=Ur((Or,zn)=>{(function(s,f){typeof Or=="object"&&typeof zn<"u"?f(Or):typeof define=="function"&&define.amd?define(["exports"],f):f(s.opentype=s.opentype||{})})(Or,(function(s){"use strict";var f=0,p=-3;function h(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function v(e,r){this.source=e,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=r,this.destLen=0,this.ltree=new h,this.dtree=new h}var x=new h,S=new h,L=new Uint8Array(30),k=new Uint16Array(30),D=new Uint8Array(30),V=new Uint16Array(30),N=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),W=new h,X=new Uint8Array(320);function ve(e,r,t,n){var a,i;for(a=0;a<t;++a)e[a]=0;for(a=0;a<30-t;++a)e[a+t]=a/t|0;for(i=n,a=0;a<30;++a)r[a]=i,i+=1<<e[a]}function Ae(e,r){var t;for(t=0;t<7;++t)e.table[t]=0;for(e.table[7]=24,e.table[8]=152,e.table[9]=112,t=0;t<24;++t)e.trans[t]=256+t;for(t=0;t<144;++t)e.trans[24+t]=t;for(t=0;t<8;++t)e.trans[168+t]=280+t;for(t=0;t<112;++t)e.trans[176+t]=144+t;for(t=0;t<5;++t)r.table[t]=0;for(r.table[5]=32,t=0;t<32;++t)r.trans[t]=t}var xt=new Uint16Array(16);function Dr(e,r,t,n){var a,i;for(a=0;a<16;++a)e.table[a]=0;for(a=0;a<n;++a)e.table[r[t+a]]++;for(e.table[0]=0,i=0,a=0;a<16;++a)xt[a]=i,i+=e.table[a];for(a=0;a<n;++a)r[t+a]&&(e.trans[xt[r[t+a]]++]=a)}function oa(e){e.bitcount--||(e.tag=e.source[e.sourceIndex++],e.bitcount=7);var r=e.tag&1;return e.tag>>>=1,r}function Se(e,r,t){if(!r)return t;for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var n=e.tag&65535>>>16-r;return e.tag>>>=r,e.bitcount-=r,n+t}function Ar(e,r){for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var t=0,n=0,a=0,i=e.tag;do n=2*n+(i&1),i>>>=1,++a,t+=r.table[a],n-=r.table[a];while(n>=0);return e.tag=i,e.bitcount-=a,r.trans[t+n]}function ua(e,r,t){var n,a,i,o,l,u;for(n=Se(e,5,257),a=Se(e,5,1),i=Se(e,4,4),o=0;o<19;++o)X[o]=0;for(o=0;o<i;++o){var c=Se(e,3,0);X[N[o]]=c}for(Dr(W,X,0,19),l=0;l<n+a;){var d=Ar(e,W);switch(d){case 16:var y=X[l-1];for(u=Se(e,2,3);u;--u)X[l++]=y;break;case 17:for(u=Se(e,3,3);u;--u)X[l++]=0;break;case 18:for(u=Se(e,7,11);u;--u)X[l++]=0;break;default:X[l++]=d;break}}Dr(r,X,0,n),Dr(t,X,n,a)}function St(e,r,t){for(;;){var n=Ar(e,r);if(n===256)return f;if(n<256)e.dest[e.destLen++]=n;else{var a,i,o,l;for(n-=257,a=Se(e,L[n],k[n]),i=Ar(e,t),o=e.destLen-Se(e,D[i],V[i]),l=o;l<o+a;++l)e.dest[e.destLen++]=e.dest[l]}}}function la(e){for(var r,t,n;e.bitcount>8;)e.sourceIndex--,e.bitcount-=8;if(r=e.source[e.sourceIndex+1],r=256*r+e.source[e.sourceIndex],t=e.source[e.sourceIndex+3],t=256*t+e.source[e.sourceIndex+2],r!==(~t&65535))return p;for(e.sourceIndex+=4,n=r;n;--n)e.dest[e.destLen++]=e.source[e.sourceIndex++];return e.bitcount=0,f}function fa(e,r){var t=new v(e,r),n,a,i;do{switch(n=oa(t),a=Se(t,2,0),a){case 0:i=la(t);break;case 1:i=St(t,x,S);break;case 2:ua(t,t.ltree,t.dtree),i=St(t,t.ltree,t.dtree);break;default:i=p}if(i!==f)throw new Error("Data error")}while(!n);return t.destLen<t.dest.length?typeof t.dest.slice=="function"?t.dest.slice(0,t.destLen):t.dest.subarray(0,t.destLen):t.dest}Ae(x,S),ve(L,k,4,3),ve(D,V,2,1),L[28]=0,k[28]=258;var pa=fa;function We(e,r,t,n,a){return Math.pow(1-a,3)*e+3*Math.pow(1-a,2)*a*r+3*(1-a)*Math.pow(a,2)*t+Math.pow(a,3)*n}function ke(){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN}ke.prototype.isEmpty=function(){return isNaN(this.x1)||isNaN(this.y1)||isNaN(this.x2)||isNaN(this.y2)},ke.prototype.addPoint=function(e,r){typeof e=="number"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),e<this.x1&&(this.x1=e),e>this.x2&&(this.x2=e)),typeof r=="number"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=r,this.y2=r),r<this.y1&&(this.y1=r),r>this.y2&&(this.y2=r))},ke.prototype.addX=function(e){this.addPoint(e,null)},ke.prototype.addY=function(e){this.addPoint(null,e)},ke.prototype.addBezier=function(e,r,t,n,a,i,o,l){var u=this,c=[e,r],d=[t,n],y=[a,i],g=[o,l];this.addPoint(e,r),this.addPoint(o,l);for(var m=0;m<=1;m++){var T=6*c[m]-12*d[m]+6*y[m],O=-3*c[m]+9*d[m]-9*y[m]+3*g[m],F=3*d[m]-3*c[m];if(O===0){if(T===0)continue;var U=-F/T;0<U&&U<1&&(m===0&&u.addX(We(c[m],d[m],y[m],g[m],U)),m===1&&u.addY(We(c[m],d[m],y[m],g[m],U)));continue}var P=Math.pow(T,2)-4*F*O;if(!(P<0)){var I=(-T+Math.sqrt(P))/(2*O);0<I&&I<1&&(m===0&&u.addX(We(c[m],d[m],y[m],g[m],I)),m===1&&u.addY(We(c[m],d[m],y[m],g[m],I)));var H=(-T-Math.sqrt(P))/(2*O);0<H&&H<1&&(m===0&&u.addX(We(c[m],d[m],y[m],g[m],H)),m===1&&u.addY(We(c[m],d[m],y[m],g[m],H)))}}},ke.prototype.addQuad=function(e,r,t,n,a,i){var o=e+.6666666666666666*(t-e),l=r+2/3*(n-r),u=o+1/3*(a-e),c=l+1/3*(i-r);this.addBezier(e,r,o,l,u,c,a,i)};function Z(){this.commands=[],this.fill="black",this.stroke=null,this.strokeWidth=1}Z.prototype.moveTo=function(e,r){this.commands.push({type:"M",x:e,y:r})},Z.prototype.lineTo=function(e,r){this.commands.push({type:"L",x:e,y:r})},Z.prototype.curveTo=Z.prototype.bezierCurveTo=function(e,r,t,n,a,i){this.commands.push({type:"C",x1:e,y1:r,x2:t,y2:n,x:a,y:i})},Z.prototype.quadTo=Z.prototype.quadraticCurveTo=function(e,r,t,n){this.commands.push({type:"Q",x1:e,y1:r,x:t,y:n})},Z.prototype.close=Z.prototype.closePath=function(){this.commands.push({type:"Z"})},Z.prototype.extend=function(e){if(e.commands)e=e.commands;else if(e instanceof ke){var r=e;this.moveTo(r.x1,r.y1),this.lineTo(r.x2,r.y1),this.lineTo(r.x2,r.y2),this.lineTo(r.x1,r.y2),this.close();return}Array.prototype.push.apply(this.commands,e)},Z.prototype.getBoundingBox=function(){for(var e=this,r=new ke,t=0,n=0,a=0,i=0,o=0;o<this.commands.length;o++){var l=e.commands[o];switch(l.type){case"M":r.addPoint(l.x,l.y),t=a=l.x,n=i=l.y;break;case"L":r.addPoint(l.x,l.y),a=l.x,i=l.y;break;case"Q":r.addQuad(a,i,l.x1,l.y1,l.x,l.y),a=l.x,i=l.y;break;case"C":r.addBezier(a,i,l.x1,l.y1,l.x2,l.y2,l.x,l.y),a=l.x,i=l.y;break;case"Z":a=t,i=n;break;default:throw new Error("Unexpected path command "+l.type)}}return r.isEmpty()&&r.addPoint(0,0),r},Z.prototype.draw=function(e){var r=this;e.beginPath();for(var t=0;t<this.commands.length;t+=1){var n=r.commands[t];n.type==="M"?e.moveTo(n.x,n.y):n.type==="L"?e.lineTo(n.x,n.y):n.type==="C"?e.bezierCurveTo(n.x1,n.y1,n.x2,n.y2,n.x,n.y):n.type==="Q"?e.quadraticCurveTo(n.x1,n.y1,n.x,n.y):n.type==="Z"&&e.closePath()}this.fill&&(e.fillStyle=this.fill,e.fill()),this.stroke&&(e.strokeStyle=this.stroke,e.lineWidth=this.strokeWidth,e.stroke())},Z.prototype.toPathData=function(e){var r=this;e=e!==void 0?e:2;function t(l){return Math.round(l)===l?""+Math.round(l):l.toFixed(e)}function n(){for(var l=arguments,u="",c=0;c<arguments.length;c+=1){var d=l[c];d>=0&&c>0&&(u+=" "),u+=t(d)}return u}for(var a="",i=0;i<this.commands.length;i+=1){var o=r.commands[i];o.type==="M"?a+="M"+n(o.x,o.y):o.type==="L"?a+="L"+n(o.x,o.y):o.type==="C"?a+="C"+n(o.x1,o.y1,o.x2,o.y2,o.x,o.y):o.type==="Q"?a+="Q"+n(o.x1,o.y1,o.x,o.y):o.type==="Z"&&(a+="Z")}return a},Z.prototype.toSVG=function(e){var r='<path d="';return r+=this.toPathData(e),r+='"',this.fill&&this.fill!=="black"&&(this.fill===null?r+=' fill="none"':r+=' fill="'+this.fill+'"'),this.stroke&&(r+=' stroke="'+this.stroke+'" stroke-width="'+this.strokeWidth+'"'),r+="/>",r},Z.prototype.toDOMElement=function(e){var r=this.toPathData(e),t=document.createElementNS("http://www.w3.org/2000/svg","path");return t.setAttribute("d",r),t};function Tt(e){throw new Error(e)}function kt(e,r){e||Tt(r)}var G={fail:Tt,argument:kt,assert:kt},Ft=32768,Lt=2147483648,Ve={},E={},M={};function ge(e){return function(){return e}}E.BYTE=function(e){return G.argument(e>=0&&e<=255,"Byte value should be between 0 and 255."),[e]},M.BYTE=ge(1),E.CHAR=function(e){return[e.charCodeAt(0)]},M.CHAR=ge(1),E.CHARARRAY=function(e){for(var r=[],t=0;t<e.length;t+=1)r[t]=e.charCodeAt(t);return r},M.CHARARRAY=function(e){return e.length},E.USHORT=function(e){return[e>>8&255,e&255]},M.USHORT=ge(2),E.SHORT=function(e){return e>=Ft&&(e=-(2*Ft-e)),[e>>8&255,e&255]},M.SHORT=ge(2),E.UINT24=function(e){return[e>>16&255,e>>8&255,e&255]},M.UINT24=ge(3),E.ULONG=function(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]},M.ULONG=ge(4),E.LONG=function(e){return e>=Lt&&(e=-(2*Lt-e)),[e>>24&255,e>>16&255,e>>8&255,e&255]},M.LONG=ge(4),E.FIXED=E.ULONG,M.FIXED=M.ULONG,E.FWORD=E.SHORT,M.FWORD=M.SHORT,E.UFWORD=E.USHORT,M.UFWORD=M.USHORT,E.LONGDATETIME=function(e){return[0,0,0,0,e>>24&255,e>>16&255,e>>8&255,e&255]},M.LONGDATETIME=ge(8),E.TAG=function(e){return G.argument(e.length===4,"Tag should be exactly 4 ASCII characters."),[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]},M.TAG=ge(4),E.Card8=E.BYTE,M.Card8=M.BYTE,E.Card16=E.USHORT,M.Card16=M.USHORT,E.OffSize=E.BYTE,M.OffSize=M.BYTE,E.SID=E.USHORT,M.SID=M.USHORT,E.NUMBER=function(e){return e>=-107&&e<=107?[e+139]:e>=108&&e<=1131?(e=e-108,[(e>>8)+247,e&255]):e>=-1131&&e<=-108?(e=-e-108,[(e>>8)+251,e&255]):e>=-32768&&e<=32767?E.NUMBER16(e):E.NUMBER32(e)},M.NUMBER=function(e){return E.NUMBER(e).length},E.NUMBER16=function(e){return[28,e>>8&255,e&255]},M.NUMBER16=ge(3),E.NUMBER32=function(e){return[29,e>>24&255,e>>16&255,e>>8&255,e&255]},M.NUMBER32=ge(5),E.REAL=function(e){var r=e.toString(),t=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(r);if(t){var n=parseFloat("1e"+((t[2]?+t[2]:0)+t[1].length));r=(Math.round(e*n)/n).toString()}for(var a="",i=0,o=r.length;i<o;i+=1){var l=r[i];l==="e"?a+=r[++i]==="-"?"c":"b":l==="."?a+="a":l==="-"?a+="e":a+=l}a+=a.length&1?"f":"ff";for(var u=[30],c=0,d=a.length;c<d;c+=2)u.push(parseInt(a.substr(c,2),16));return u},M.REAL=function(e){return E.REAL(e).length},E.NAME=E.CHARARRAY,M.NAME=M.CHARARRAY,E.STRING=E.CHARARRAY,M.STRING=M.CHARARRAY,Ve.UTF8=function(e,r,t){for(var n=[],a=t,i=0;i<a;i++,r+=1)n[i]=e.getUint8(r);return String.fromCharCode.apply(null,n)},Ve.UTF16=function(e,r,t){for(var n=[],a=t/2,i=0;i<a;i++,r+=2)n[i]=e.getUint16(r);return String.fromCharCode.apply(null,n)},E.UTF16=function(e){for(var r=[],t=0;t<e.length;t+=1){var n=e.charCodeAt(t);r[r.length]=n>>8&255,r[r.length]=n&255}return r},M.UTF16=function(e){return e.length*2};var Mr={"x-mac-croatian":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\u0160\u2122\xB4\xA8\u2260\u017D\xD8\u221E\xB1\u2264\u2265\u2206\xB5\u2202\u2211\u220F\u0161\u222B\xAA\xBA\u03A9\u017E\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u0106\xAB\u010C\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u0110\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\uF8FF\xA9\u2044\u20AC\u2039\u203A\xC6\xBB\u2013\xB7\u201A\u201E\u2030\xC2\u0107\xC1\u010D\xC8\xCD\xCE\xCF\xCC\xD3\xD4\u0111\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u03C0\xCB\u02DA\xB8\xCA\xE6\u02C7","x-mac-cyrillic":"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u2020\xB0\u0490\xA3\xA7\u2022\xB6\u0406\xAE\xA9\u2122\u0402\u0452\u2260\u0403\u0453\u221E\xB1\u2264\u2265\u0456\xB5\u0491\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040A\u045A\u0458\u0405\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\u040B\u045B\u040C\u045C\u0455\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u201E\u040E\u045E\u040F\u045F\u2116\u0401\u0451\u044F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E","x-mac-gaelic":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u1E02\xB1\u2264\u2265\u1E03\u010A\u010B\u1E0A\u1E0B\u1E1E\u1E1F\u0120\u0121\u1E40\xE6\xF8\u1E41\u1E56\u1E57\u027C\u0192\u017F\u1E60\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\u1E61\u1E9B\xFF\u0178\u1E6A\u20AC\u2039\u203A\u0176\u0177\u1E6B\xB7\u1EF2\u1EF3\u204A\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\u2663\xD2\xDA\xDB\xD9\u0131\xDD\xFD\u0174\u0175\u1E84\u1E85\u1E80\u1E81\u1E82\u1E83","x-mac-greek":"\xC4\xB9\xB2\xC9\xB3\xD6\xDC\u0385\xE0\xE2\xE4\u0384\xA8\xE7\xE9\xE8\xEA\xEB\xA3\u2122\xEE\xEF\u2022\xBD\u2030\xF4\xF6\xA6\u20AC\xF9\xFB\xFC\u2020\u0393\u0394\u0398\u039B\u039E\u03A0\xDF\xAE\xA9\u03A3\u03AA\xA7\u2260\xB0\xB7\u0391\xB1\u2264\u2265\xA5\u0392\u0395\u0396\u0397\u0399\u039A\u039C\u03A6\u03AB\u03A8\u03A9\u03AC\u039D\xAC\u039F\u03A1\u2248\u03A4\xAB\xBB\u2026\xA0\u03A5\u03A7\u0386\u0388\u0153\u2013\u2015\u201C\u201D\u2018\u2019\xF7\u0389\u038A\u038C\u038E\u03AD\u03AE\u03AF\u03CC\u038F\u03CD\u03B1\u03B2\u03C8\u03B4\u03B5\u03C6\u03B3\u03B7\u03B9\u03BE\u03BA\u03BB\u03BC\u03BD\u03BF\u03C0\u03CE\u03C1\u03C3\u03C4\u03B8\u03C9\u03C2\u03C7\u03C5\u03B6\u03CA\u03CB\u0390\u03B0\xAD","x-mac-icelandic":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\xDD\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\xD0\xF0\xDE\xFE\xFD\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-inuit":"\u1403\u1404\u1405\u1406\u140A\u140B\u1431\u1432\u1433\u1434\u1438\u1439\u1449\u144E\u144F\u1450\u1451\u1455\u1456\u1466\u146D\u146E\u146F\u1470\u1472\u1473\u1483\u148B\u148C\u148D\u148E\u1490\u1491\xB0\u14A1\u14A5\u14A6\u2022\xB6\u14A7\xAE\xA9\u2122\u14A8\u14AA\u14AB\u14BB\u14C2\u14C3\u14C4\u14C5\u14C7\u14C8\u14D0\u14EF\u14F0\u14F1\u14F2\u14F4\u14F5\u1505\u14D5\u14D6\u14D7\u14D8\u14DA\u14DB\u14EA\u1528\u1529\u152A\u152B\u152D\u2026\xA0\u152E\u153E\u1555\u1556\u1557\u2013\u2014\u201C\u201D\u2018\u2019\u1558\u1559\u155A\u155D\u1546\u1547\u1548\u1549\u154B\u154C\u1550\u157F\u1580\u1581\u1582\u1583\u1584\u1585\u158F\u1590\u1591\u1592\u1593\u1594\u1595\u1671\u1672\u1673\u1674\u1675\u1676\u1596\u15A0\u15A1\u15A2\u15A3\u15A4\u15A5\u15A6\u157C\u0141\u0142","x-mac-ce":"\xC4\u0100\u0101\xC9\u0104\xD6\xDC\xE1\u0105\u010C\xE4\u010D\u0106\u0107\xE9\u0179\u017A\u010E\xED\u010F\u0112\u0113\u0116\xF3\u0117\xF4\xF6\xF5\xFA\u011A\u011B\xFC\u2020\xB0\u0118\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\u0119\xA8\u2260\u0123\u012E\u012F\u012A\u2264\u2265\u012B\u0136\u2202\u2211\u0142\u013B\u013C\u013D\u013E\u0139\u013A\u0145\u0146\u0143\xAC\u221A\u0144\u0147\u2206\xAB\xBB\u2026\xA0\u0148\u0150\xD5\u0151\u014C\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\u014D\u0154\u0155\u0158\u2039\u203A\u0159\u0156\u0157\u0160\u201A\u201E\u0161\u015A\u015B\xC1\u0164\u0165\xCD\u017D\u017E\u016A\xD3\xD4\u016B\u016E\xDA\u016F\u0170\u0171\u0172\u0173\xDD\xFD\u0137\u017B\u0141\u017C\u0122\u02C7",macintosh:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-romanian":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\u0102\u0218\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\u0103\u0219\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\u2039\u203A\u021A\u021B\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-turkish":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u011E\u011F\u0130\u0131\u015E\u015F\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\uF8A0\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"};Ve.MACSTRING=function(e,r,t,n){var a=Mr[n];if(a!==void 0){for(var i="",o=0;o<t;o++){var l=e.getUint8(r+o);l<=127?i+=String.fromCharCode(l):i+=a[l&127]}return i}};var fr=typeof WeakMap=="function"&&new WeakMap,pr,ha=function(e){if(!pr){pr={};for(var r in Mr)pr[r]=new String(r)}var t=pr[e];if(t!==void 0){if(fr){var n=fr.get(t);if(n!==void 0)return n}var a=Mr[e];if(a!==void 0){for(var i={},o=0;o<a.length;o++)i[a.charCodeAt(o)]=o+128;return fr&&fr.set(t,i),i}}};E.MACSTRING=function(e,r){var t=ha(r);if(t!==void 0){for(var n=[],a=0;a<e.length;a++){var i=e.charCodeAt(a);if(i>=128&&(i=t[i],i===void 0))return;n[a]=i}return n}},M.MACSTRING=function(e,r){var t=E.MACSTRING(e,r);return t!==void 0?t.length:0};function Br(e){return e>=-128&&e<=127}function ca(e,r,t){for(var n=0,a=e.length;r<a&&n<64&&e[r]===0;)++r,++n;return t.push(128|n-1),r}function va(e,r,t){for(var n=0,a=e.length,i=r;i<a&&n<64;){var o=e[i];if(!Br(o)||o===0&&i+1<a&&e[i+1]===0)break;++i,++n}t.push(n-1);for(var l=r;l<i;++l)t.push(e[l]+256&255);return i}function da(e,r,t){for(var n=0,a=e.length,i=r;i<a&&n<64;){var o=e[i];if(o===0||Br(o)&&i+1<a&&Br(e[i+1]))break;++i,++n}t.push(64|n-1);for(var l=r;l<i;++l){var u=e[l];t.push(u+65536>>8&255,u+256&255)}return i}E.VARDELTAS=function(e){for(var r=0,t=[];r<e.length;){var n=e[r];n===0?r=ca(e,r,t):n>=-128&&n<=127?r=va(e,r,t):r=da(e,r,t)}return t},E.INDEX=function(e){for(var r=1,t=[r],n=[],a=0;a<e.length;a+=1){var i=E.OBJECT(e[a]);Array.prototype.push.apply(n,i),r+=i.length,t.push(r)}if(n.length===0)return[0,0];for(var o=[],l=1+Math.floor(Math.log(r)/Math.log(2))/8|0,u=[void 0,E.BYTE,E.USHORT,E.UINT24,E.ULONG][l],c=0;c<t.length;c+=1){var d=u(t[c]);Array.prototype.push.apply(o,d)}return Array.prototype.concat(E.Card16(e.length),E.OffSize(l),o,n)},M.INDEX=function(e){return E.INDEX(e).length},E.DICT=function(e){for(var r=[],t=Object.keys(e),n=t.length,a=0;a<n;a+=1){var i=parseInt(t[a],0),o=e[i];r=r.concat(E.OPERAND(o.value,o.type)),r=r.concat(E.OPERATOR(i))}return r},M.DICT=function(e){return E.DICT(e).length},E.OPERATOR=function(e){return e<1200?[e]:[12,e-1200]},E.OPERAND=function(e,r){var t=[];if(Array.isArray(r))for(var n=0;n<r.length;n+=1)G.argument(e.length===r.length,"Not enough arguments given for type"+r),t=t.concat(E.OPERAND(e[n],r[n]));else if(r==="SID")t=t.concat(E.NUMBER(e));else if(r==="offset")t=t.concat(E.NUMBER32(e));else if(r==="number")t=t.concat(E.NUMBER(e));else if(r==="real")t=t.concat(E.REAL(e));else throw new Error("Unknown operand type "+r);return t},E.OP=E.BYTE,M.OP=M.BYTE;var hr=typeof WeakMap=="function"&&new WeakMap;E.CHARSTRING=function(e){if(hr){var r=hr.get(e);if(r!==void 0)return r}for(var t=[],n=e.length,a=0;a<n;a+=1){var i=e[a];t=t.concat(E[i.type](i.value))}return hr&&hr.set(e,t),t},M.CHARSTRING=function(e){return E.CHARSTRING(e).length},E.OBJECT=function(e){var r=E[e.type];return G.argument(r!==void 0,"No encoding function for type "+e.type),r(e.value)},M.OBJECT=function(e){var r=M[e.type];return G.argument(r!==void 0,"No sizeOf function for type "+e.type),r(e.value)},E.TABLE=function(e){for(var r=[],t=e.fields.length,n=[],a=[],i=0;i<t;i+=1){var o=e.fields[i],l=E[o.type];G.argument(l!==void 0,"No encoding function for field type "+o.type+" ("+o.name+")");var u=e[o.name];u===void 0&&(u=o.value);var c=l(u);o.type==="TABLE"?(a.push(r.length),r=r.concat([0,0]),n.push(c)):r=r.concat(c)}for(var d=0;d<n.length;d+=1){var y=a[d],g=r.length;G.argument(g<65536,"Table "+e.tableName+" too big."),r[y]=g>>8,r[y+1]=g&255,r=r.concat(n[d])}return r},M.TABLE=function(e){for(var r=0,t=e.fields.length,n=0;n<t;n+=1){var a=e.fields[n],i=M[a.type];G.argument(i!==void 0,"No sizeOf function for field type "+a.type+" ("+a.name+")");var o=e[a.name];o===void 0&&(o=a.value),r+=i(o),a.type==="TABLE"&&(r+=2)}return r},E.RECORD=E.TABLE,M.RECORD=M.TABLE,E.LITERAL=function(e){return e},M.LITERAL=function(e){return e.length};function ee(e,r,t){for(var n=this,a=0;a<r.length;a+=1){var i=r[a];n[i.name]=i.value}if(this.tableName=e,this.fields=r,t)for(var o=Object.keys(t),l=0;l<o.length;l+=1){var u=o[l],c=t[u];n[u]!==void 0&&(n[u]=c)}}ee.prototype.encode=function(){return E.TABLE(this)},ee.prototype.sizeOf=function(){return M.TABLE(this)};function je(e,r,t){t===void 0&&(t=r.length);var n=new Array(r.length+1);n[0]={name:e+"Count",type:"USHORT",value:t};for(var a=0;a<r.length;a++)n[a+1]={name:e+a,type:"USHORT",value:r[a]};return n}function Pr(e,r,t){var n=r.length,a=new Array(n+1);a[0]={name:e+"Count",type:"USHORT",value:n};for(var i=0;i<n;i++)a[i+1]={name:e+i,type:"TABLE",value:t(r[i],i)};return a}function cr(e,r,t){var n=r.length,a=[];a[0]={name:e+"Count",type:"USHORT",value:n};for(var i=0;i<n;i++)a=a.concat(t(r[i],i));return a}function vr(e){e.format===1?ee.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:1}].concat(je("glyph",e.glyphs))):G.assert(!1,"Can't create coverage table format 2 yet.")}vr.prototype=Object.create(ee.prototype),vr.prototype.constructor=vr;function dr(e){ee.call(this,"scriptListTable",cr("scriptRecord",e,function(r,t){var n=r.script,a=n.defaultLangSys;return G.assert(!!a,"Unable to write GSUB: script "+r.tag+" has no default language system."),[{name:"scriptTag"+t,type:"TAG",value:r.tag},{name:"script"+t,type:"TABLE",value:new ee("scriptTable",[{name:"defaultLangSys",type:"TABLE",value:new ee("defaultLangSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:a.reqFeatureIndex}].concat(je("featureIndex",a.featureIndexes)))}].concat(cr("langSys",n.langSysRecords,function(i,o){var l=i.langSys;return[{name:"langSysTag"+o,type:"TAG",value:i.tag},{name:"langSys"+o,type:"TABLE",value:new ee("langSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:l.reqFeatureIndex}].concat(je("featureIndex",l.featureIndexes)))}]})))}]}))}dr.prototype=Object.create(ee.prototype),dr.prototype.constructor=dr;function gr(e){ee.call(this,"featureListTable",cr("featureRecord",e,function(r,t){var n=r.feature;return[{name:"featureTag"+t,type:"TAG",value:r.tag},{name:"feature"+t,type:"TABLE",value:new ee("featureTable",[{name:"featureParams",type:"USHORT",value:n.featureParams}].concat(je("lookupListIndex",n.lookupListIndexes)))}]}))}gr.prototype=Object.create(ee.prototype),gr.prototype.constructor=gr;function mr(e,r){ee.call(this,"lookupListTable",Pr("lookup",e,function(t){var n=r[t.lookupType];return G.assert(!!n,"Unable to write GSUB lookup type "+t.lookupType+" tables."),new ee("lookupTable",[{name:"lookupType",type:"USHORT",value:t.lookupType},{name:"lookupFlag",type:"USHORT",value:t.lookupFlag}].concat(Pr("subtable",t.subtables,n)))}))}mr.prototype=Object.create(ee.prototype),mr.prototype.constructor=mr;var A={Table:ee,Record:ee,Coverage:vr,ScriptList:dr,FeatureList:gr,LookupList:mr,ushortList:je,tableList:Pr,recordList:cr};function Et(e,r){return e.getUint8(r)}function yr(e,r){return e.getUint16(r,!1)}function ga(e,r){return e.getInt16(r,!1)}function Gr(e,r){return e.getUint32(r,!1)}function Ut(e,r){var t=e.getInt16(r,!1),n=e.getUint16(r+2,!1);return t+n/65535}function ma(e,r){for(var t="",n=r;n<r+4;n+=1)t+=String.fromCharCode(e.getInt8(n));return t}function ya(e,r,t){for(var n=0,a=0;a<t;a+=1)n<<=8,n+=e.getUint8(r+a);return n}function ba(e,r,t){for(var n=[],a=r;a<t;a+=1)n.push(e.getUint8(a));return n}function xa(e){for(var r="",t=0;t<e.length;t+=1)r+=String.fromCharCode(e[t]);return r}var Sa={byte:1,uShort:2,short:2,uLong:4,fixed:4,longDateTime:8,tag:4};function b(e,r){this.data=e,this.offset=r,this.relativeOffset=0}b.prototype.parseByte=function(){var e=this.data.getUint8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},b.prototype.parseChar=function(){var e=this.data.getInt8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},b.prototype.parseCard8=b.prototype.parseByte,b.prototype.parseUShort=function(){var e=this.data.getUint16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},b.prototype.parseCard16=b.prototype.parseUShort,b.prototype.parseSID=b.prototype.parseUShort,b.prototype.parseOffset16=b.prototype.parseUShort,b.prototype.parseShort=function(){var e=this.data.getInt16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},b.prototype.parseF2Dot14=function(){var e=this.data.getInt16(this.offset+this.relativeOffset)/16384;return this.relativeOffset+=2,e},b.prototype.parseULong=function(){var e=Gr(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},b.prototype.parseOffset32=b.prototype.parseULong,b.prototype.parseFixed=function(){var e=Ut(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},b.prototype.parseString=function(e){var r=this.data,t=this.offset+this.relativeOffset,n="";this.relativeOffset+=e;for(var a=0;a<e;a++)n+=String.fromCharCode(r.getUint8(t+a));return n},b.prototype.parseTag=function(){return this.parseString(4)},b.prototype.parseLongDateTime=function(){var e=Gr(this.data,this.offset+this.relativeOffset+4);return e-=2082844800,this.relativeOffset+=8,e},b.prototype.parseVersion=function(e){var r=yr(this.data,this.offset+this.relativeOffset),t=yr(this.data,this.offset+this.relativeOffset+2);return this.relativeOffset+=4,e===void 0&&(e=4096),r+t/e/10},b.prototype.skip=function(e,r){r===void 0&&(r=1),this.relativeOffset+=Sa[e]*r},b.prototype.parseULongList=function(e){e===void 0&&(e=this.parseULong());for(var r=new Array(e),t=this.data,n=this.offset+this.relativeOffset,a=0;a<e;a++)r[a]=t.getUint32(n),n+=4;return this.relativeOffset+=e*4,r},b.prototype.parseOffset16List=b.prototype.parseUShortList=function(e){e===void 0&&(e=this.parseUShort());for(var r=new Array(e),t=this.data,n=this.offset+this.relativeOffset,a=0;a<e;a++)r[a]=t.getUint16(n),n+=2;return this.relativeOffset+=e*2,r},b.prototype.parseShortList=function(e){for(var r=new Array(e),t=this.data,n=this.offset+this.relativeOffset,a=0;a<e;a++)r[a]=t.getInt16(n),n+=2;return this.relativeOffset+=e*2,r},b.prototype.parseByteList=function(e){for(var r=new Array(e),t=this.data,n=this.offset+this.relativeOffset,a=0;a<e;a++)r[a]=t.getUint8(n++);return this.relativeOffset+=e,r},b.prototype.parseList=function(e,r){var t=this;r||(r=e,e=this.parseUShort());for(var n=new Array(e),a=0;a<e;a++)n[a]=r.call(t);return n},b.prototype.parseList32=function(e,r){var t=this;r||(r=e,e=this.parseULong());for(var n=new Array(e),a=0;a<e;a++)n[a]=r.call(t);return n},b.prototype.parseRecordList=function(e,r){var t=this;r||(r=e,e=this.parseUShort());for(var n=new Array(e),a=Object.keys(r),i=0;i<e;i++){for(var o={},l=0;l<a.length;l++){var u=a[l],c=r[u];o[u]=c.call(t)}n[i]=o}return n},b.prototype.parseRecordList32=function(e,r){var t=this;r||(r=e,e=this.parseULong());for(var n=new Array(e),a=Object.keys(r),i=0;i<e;i++){for(var o={},l=0;l<a.length;l++){var u=a[l],c=r[u];o[u]=c.call(t)}n[i]=o}return n},b.prototype.parseStruct=function(e){var r=this;if(typeof e=="function")return e.call(this);for(var t=Object.keys(e),n={},a=0;a<t.length;a++){var i=t[a],o=e[i];n[i]=o.call(r)}return n},b.prototype.parseValueRecord=function(e){if(e===void 0&&(e=this.parseUShort()),e!==0){var r={};return e&1&&(r.xPlacement=this.parseShort()),e&2&&(r.yPlacement=this.parseShort()),e&4&&(r.xAdvance=this.parseShort()),e&8&&(r.yAdvance=this.parseShort()),e&16&&(r.xPlaDevice=void 0,this.parseShort()),e&32&&(r.yPlaDevice=void 0,this.parseShort()),e&64&&(r.xAdvDevice=void 0,this.parseShort()),e&128&&(r.yAdvDevice=void 0,this.parseShort()),r}},b.prototype.parseValueRecordList=function(){for(var e=this,r=this.parseUShort(),t=this.parseUShort(),n=new Array(t),a=0;a<t;a++)n[a]=e.parseValueRecord(r);return n},b.prototype.parsePointer=function(e){var r=this.parseOffset16();if(r>0)return new b(this.data,this.offset+r).parseStruct(e)},b.prototype.parsePointer32=function(e){var r=this.parseOffset32();if(r>0)return new b(this.data,this.offset+r).parseStruct(e)},b.prototype.parseListOfLists=function(e){for(var r=this,t=this.parseOffset16List(),n=t.length,a=this.relativeOffset,i=new Array(n),o=0;o<n;o++){var l=t[o];if(l===0){i[o]=void 0;continue}if(r.relativeOffset=l,e){for(var u=r.parseOffset16List(),c=new Array(u.length),d=0;d<u.length;d++)r.relativeOffset=l+u[d],c[d]=e.call(r);i[o]=c}else i[o]=r.parseUShortList()}return this.relativeOffset=a,i},b.prototype.parseCoverage=function(){var e=this,r=this.offset+this.relativeOffset,t=this.parseUShort(),n=this.parseUShort();if(t===1)return{format:1,glyphs:this.parseUShortList(n)};if(t===2){for(var a=new Array(n),i=0;i<n;i++)a[i]={start:e.parseUShort(),end:e.parseUShort(),index:e.parseUShort()};return{format:2,ranges:a}}throw new Error("0x"+r.toString(16)+": Coverage format must be 1 or 2.")},b.prototype.parseClassDef=function(){var e=this.offset+this.relativeOffset,r=this.parseUShort();if(r===1)return{format:1,startGlyph:this.parseUShort(),classes:this.parseUShortList()};if(r===2)return{format:2,ranges:this.parseRecordList({start:b.uShort,end:b.uShort,classId:b.uShort})};throw new Error("0x"+e.toString(16)+": ClassDef format must be 1 or 2.")},b.list=function(e,r){return function(){return this.parseList(e,r)}},b.list32=function(e,r){return function(){return this.parseList32(e,r)}},b.recordList=function(e,r){return function(){return this.parseRecordList(e,r)}},b.recordList32=function(e,r){return function(){return this.parseRecordList32(e,r)}},b.pointer=function(e){return function(){return this.parsePointer(e)}},b.pointer32=function(e){return function(){return this.parsePointer32(e)}},b.tag=b.prototype.parseTag,b.byte=b.prototype.parseByte,b.uShort=b.offset16=b.prototype.parseUShort,b.uShortList=b.prototype.parseUShortList,b.uLong=b.offset32=b.prototype.parseULong,b.uLongList=b.prototype.parseULongList,b.struct=b.prototype.parseStruct,b.coverage=b.prototype.parseCoverage,b.classDef=b.prototype.parseClassDef;var Ot={reserved:b.uShort,reqFeatureIndex:b.uShort,featureIndexes:b.uShortList};b.prototype.parseScriptList=function(){return this.parsePointer(b.recordList({tag:b.tag,script:b.pointer({defaultLangSys:b.pointer(Ot),langSysRecords:b.recordList({tag:b.tag,langSys:b.pointer(Ot)})})}))||[]},b.prototype.parseFeatureList=function(){return this.parsePointer(b.recordList({tag:b.tag,feature:b.pointer({featureParams:b.offset16,lookupListIndexes:b.uShortList})}))||[]},b.prototype.parseLookupList=function(e){return this.parsePointer(b.list(b.pointer(function(){var r=this.parseUShort();G.argument(1<=r&&r<=9,"GPOS/GSUB lookup type "+r+" unknown.");var t=this.parseUShort(),n=t&16;return{lookupType:r,lookupFlag:t,subtables:this.parseList(b.pointer(e[r])),markFilteringSet:n?this.parseUShort():void 0}})))||[]},b.prototype.parseFeatureVariationsList=function(){return this.parsePointer32(function(){var e=this.parseUShort(),r=this.parseUShort();G.argument(e===1&&r<1,"GPOS/GSUB feature variations table unknown.");var t=this.parseRecordList32({conditionSetOffset:b.offset32,featureTableSubstitutionOffset:b.offset32});return t})||[]};var w={getByte:Et,getCard8:Et,getUShort:yr,getCard16:yr,getShort:ga,getULong:Gr,getFixed:Ut,getTag:ma,getOffset:ya,getBytes:ba,bytesToString:xa,Parser:b};function Ta(e,r){r.parseUShort(),e.length=r.parseULong(),e.language=r.parseULong();var t;e.groupCount=t=r.parseULong(),e.glyphIndexMap={};for(var n=0;n<t;n+=1)for(var a=r.parseULong(),i=r.parseULong(),o=r.parseULong(),l=a;l<=i;l+=1)e.glyphIndexMap[l]=o,o++}function ka(e,r,t,n,a){e.length=r.parseUShort(),e.language=r.parseUShort();var i;e.segCount=i=r.parseUShort()>>1,r.skip("uShort",3),e.glyphIndexMap={};for(var o=new w.Parser(t,n+a+14),l=new w.Parser(t,n+a+16+i*2),u=new w.Parser(t,n+a+16+i*4),c=new w.Parser(t,n+a+16+i*6),d=n+a+16+i*8,y=0;y<i-1;y+=1)for(var g=void 0,m=o.parseUShort(),T=l.parseUShort(),O=u.parseShort(),F=c.parseUShort(),U=T;U<=m;U+=1)F!==0?(d=c.offset+c.relativeOffset-2,d+=F,d+=(U-T)*2,g=w.getUShort(t,d),g!==0&&(g=g+O&65535)):g=U+O&65535,e.glyphIndexMap[U]=g}function Fa(e,r){var t={};t.version=w.getUShort(e,r),G.argument(t.version===0,"cmap table version should be 0."),t.numTables=w.getUShort(e,r+2);for(var n=-1,a=t.numTables-1;a>=0;a-=1){var i=w.getUShort(e,r+4+a*8),o=w.getUShort(e,r+4+a*8+2);if(i===3&&(o===0||o===1||o===10)){n=w.getULong(e,r+4+a*8+4);break}}if(n===-1)throw new Error("No valid cmap sub-tables found.");var l=new w.Parser(e,r+n);if(t.format=l.parseUShort(),t.format===12)Ta(t,l);else if(t.format===4)ka(t,l,e,r,n);else throw new Error("Only format 4 and 12 cmap tables are supported (found format "+t.format+").");return t}function La(e,r,t){e.segments.push({end:r,start:r,delta:-(r-t),offset:0,glyphIndex:t})}function Ea(e){e.segments.push({end:65535,start:65535,delta:1,offset:0})}function Ua(e){var r=!0,t;for(t=e.length-1;t>0;t-=1){var n=e.get(t);if(n.unicode>65535){console.log("Adding CMAP format 12 (needed!)"),r=!1;break}}var a=[{name:"version",type:"USHORT",value:0},{name:"numTables",type:"USHORT",value:r?1:2},{name:"platformID",type:"USHORT",value:3},{name:"encodingID",type:"USHORT",value:1},{name:"offset",type:"ULONG",value:r?12:20}];r||(a=a.concat([{name:"cmap12PlatformID",type:"USHORT",value:3},{name:"cmap12EncodingID",type:"USHORT",value:10},{name:"cmap12Offset",type:"ULONG",value:0}])),a=a.concat([{name:"format",type:"USHORT",value:4},{name:"cmap4Length",type:"USHORT",value:0},{name:"language",type:"USHORT",value:0},{name:"segCountX2",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]);var i=new A.Table("cmap",a);for(i.segments=[],t=0;t<e.length;t+=1){for(var o=e.get(t),l=0;l<o.unicodes.length;l+=1)La(i,o.unicodes[l],t);i.segments=i.segments.sort(function(P,I){return P.start-I.start})}Ea(i);var u=i.segments.length,c=0,d=[],y=[],g=[],m=[],T=[],O=[];for(t=0;t<u;t+=1){var F=i.segments[t];F.end<=65535&&F.start<=65535?(d=d.concat({name:"end_"+t,type:"USHORT",value:F.end}),y=y.concat({name:"start_"+t,type:"USHORT",value:F.start}),g=g.concat({name:"idDelta_"+t,type:"SHORT",value:F.delta}),m=m.concat({name:"idRangeOffset_"+t,type:"USHORT",value:F.offset}),F.glyphId!==void 0&&(T=T.concat({name:"glyph_"+t,type:"USHORT",value:F.glyphId}))):c+=1,!r&&F.glyphIndex!==void 0&&(O=O.concat({name:"cmap12Start_"+t,type:"ULONG",value:F.start}),O=O.concat({name:"cmap12End_"+t,type:"ULONG",value:F.end}),O=O.concat({name:"cmap12Glyph_"+t,type:"ULONG",value:F.glyphIndex}))}if(i.segCountX2=(u-c)*2,i.searchRange=Math.pow(2,Math.floor(Math.log(u-c)/Math.log(2)))*2,i.entrySelector=Math.log(i.searchRange/2)/Math.log(2),i.rangeShift=i.segCountX2-i.searchRange,i.fields=i.fields.concat(d),i.fields.push({name:"reservedPad",type:"USHORT",value:0}),i.fields=i.fields.concat(y),i.fields=i.fields.concat(g),i.fields=i.fields.concat(m),i.fields=i.fields.concat(T),i.cmap4Length=14+d.length*2+2+y.length*2+g.length*2+m.length*2+T.length*2,!r){var U=16+O.length*4;i.cmap12Offset=20+i.cmap4Length,i.fields=i.fields.concat([{name:"cmap12Format",type:"USHORT",value:12},{name:"cmap12Reserved",type:"USHORT",value:0},{name:"cmap12Length",type:"ULONG",value:U},{name:"cmap12Language",type:"ULONG",value:0},{name:"cmap12nGroups",type:"ULONG",value:O.length/3}]),i.fields=i.fields.concat(O)}return i}var It={parse:Fa,make:Ua},br=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","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","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","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","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","266 ff","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],Oa=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","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","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","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","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls"],Ia=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],Me=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","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","bracketleft","backslash","bracketright","asciicircum","underscore","grave","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","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];function Ct(e){this.font=e}Ct.prototype.charToGlyphIndex=function(e){var r=e.charCodeAt(0),t=this.font.glyphs;if(t){for(var n=0;n<t.length;n+=1)for(var a=t.get(n),i=0;i<a.unicodes.length;i+=1)if(a.unicodes[i]===r)return n}return null};function wt(e){this.cmap=e}wt.prototype.charToGlyphIndex=function(e){return this.cmap.glyphIndexMap[e.charCodeAt(0)]||0};function xr(e,r){this.encoding=e,this.charset=r}xr.prototype.charToGlyphIndex=function(e){var r=e.charCodeAt(0),t=this.encoding[r];return this.charset.indexOf(t)};function Nr(e){var r=this;switch(e.version){case 1:this.names=Me.slice();break;case 2:this.names=new Array(e.numberOfGlyphs);for(var t=0;t<e.numberOfGlyphs;t++)e.glyphNameIndex[t]<Me.length?r.names[t]=Me[e.glyphNameIndex[t]]:r.names[t]=e.names[e.glyphNameIndex[t]-Me.length];break;case 2.5:this.names=new Array(e.numberOfGlyphs);for(var n=0;n<e.numberOfGlyphs;n++)r.names[n]=Me[n+e.glyphNameIndex[n]];break;case 3:this.names=[];break;default:this.names=[];break}}Nr.prototype.nameToGlyphIndex=function(e){return this.names.indexOf(e)},Nr.prototype.glyphIndexToName=function(e){return this.names[e]};function Ca(e){for(var r,t=e.tables.cmap.glyphIndexMap,n=Object.keys(t),a=0;a<n.length;a+=1){var i=n[a],o=t[i];r=e.glyphs.get(o),r.addUnicode(parseInt(i))}for(var l=0;l<e.glyphs.length;l+=1)r=e.glyphs.get(l),e.cffEncoding?e.isCIDFont?r.name="gid"+l:r.name=e.cffEncoding.charset[l]:e.glyphNames.names&&(r.name=e.glyphNames.glyphIndexToName(l))}function wa(e,r,t,n,a){e.beginPath(),e.moveTo(r,t),e.lineTo(n,a),e.stroke()}var Be={line:wa};function Rt(e,r,t,n,a){var i;return(r&n)>0?(i=e.parseByte(),(r&a)===0&&(i=-i),i=t+i):(r&a)>0?i=t:i=t+e.parseShort(),i}function Ra(e,r,t){var n=new w.Parser(r,t);e.numberOfContours=n.parseShort(),e._xMin=n.parseShort(),e._yMin=n.parseShort(),e._xMax=n.parseShort(),e._yMax=n.parseShort();var a,i;if(e.numberOfContours>0){for(var o=e.endPointIndices=[],l=0;l<e.numberOfContours;l+=1)o.push(n.parseUShort());e.inst