UNPKG

17.5 kBJavaScriptView Raw
1/* Sutton SignWriting TrueType Font Module v1.3.2 (https://github.com/sutton-signwriting/font-ttf), author: Steve Slevinski (https://SteveSlevinski.me), license: MIT */
2const t=t=>t.map((t=>(t=>String.fromCodePoint(120844+parseInt(t)-250))(t))).join(""),e=t=>(t=>parseInt(t.codePointAt(0)))(t)-262144;let o={};let i;const l=function(t){return function(t){if(t in o)return[...o[t]];if(!i){const t=document.createElement("canvas");t.width=152,t.height=152,i=t.getContext("2d")}i.clearRect(0,0,152,152),i.font="60px 'SuttonSignWritingLine'",i.fillText(String.fromCodePoint(t+983040),0,0);const e=i.getImageData(0,0,152,152).data;let l,s,n,a;t:for(l=151;l>=0;l--)for(s=0;s<152;s+=1)for(a=0;a<4;a+=1)if(n=4*l+4*s*152+a,e[n])break t;var d=l;t:for(s=151;s>=0;s--)for(l=0;l<d;l+=1)for(a=0;a<4;a+=1)if(n=4*l+4*s*152+a,e[n])break t;var r=s+1;if(d=Math.ceil(d/2),r=Math.ceil(r/2),14394==t&&(d=19),[10468,10480,10496,10512,10500,10532,10548,10862,10878,10894,11058,11074,11476,11488,11492,11504,11508,11520,10516,10910,10926,11042,11082,10942].includes(t)&&(d=20),31921==t&&(d=22),38460==t&&(d=23),[20164,20212].includes(t)&&(d=25),31894==t&&(d=28),46698==t&&(d=29),29606==t&&(d=30),44855==t&&(d=40),32667==t&&(d=50),[11088,11474,11490,11506].includes(t)&&(r=20),6285==t&&(r=21),40804==t&&(r=31),41475==t&&(r=36),0==d&&0==r){const e={9:[15,30],10:[21,30],11:[30,15],12:[30,21],13:[15,30],14:[21,30]};t in e&&(d=e[t][0],r=e[t][1])}return 0!=d||0!=r?(o[t]=[d,r],[d,r]):void 0}(e(t))},s=function(t){return String.fromCodePoint(t+983040)},n=function(t){return String.fromCodePoint(t+1048576)},a=function(t){return s(e(t))},d=function(t){return n(e(t))},r=function(t){return o=e(t),` <text class="sym-fill" fill="white" style="pointer-events:none;font-family:'SuttonSignWritingFill';font-size:30px;">${n(o)}</text>\n <text class="sym-line" fill="black" style="pointer-events:none;font-family:'SuttonSignWritingLine';font-size:30px;">${s(o)}</text>`;var o};let c={colorize:"C",colorhex:"(?:[0-9a-fA-F]{3}){1,2}",colorname:"[a-zA-Z]+",padding:"P[0-9]{2}",zoom:"Z(?:[0-9]+(?:\\.[0-9]+)?|x)",classbase:"-?[_a-zA-Z][_a-zA-Z0-9-]{0,100}",id:"[a-zA-Z][_a-zA-Z0-9-]{0,100}"};c.colorbase=`(?:${c.colorhex}|${c.colorname})`,c.color=`_${c.colorbase}_`,c.colors=`_${c.colorbase}(?:,${c.colorbase})?_`,c.background=`G${c.color}`,c.detail=`D${c.colors}`,c.detailsym=`D[0-9]{2}${c.colors}`,c.classes=`${c.classbase}(?: ${c.classbase})*`,c.full=`-(${c.colorize})?(${c.padding})?(${c.background})?(${c.detail})?(${c.zoom})?(?:-((?:${c.detailsym})*))?(?:-(${c.classes})?!(?:(${c.id})!)?)?`;const m=t=>(new RegExp(`^${c.colorhex}$`).test(t)?"#":"")+t,p=t=>{const e=`^${c.full}`,o=("string"==typeof t?t.match(new RegExp(e)):[])||[];return i={colorize:o[1]?!!o[1]:void 0,padding:o[2]?parseInt(o[2].slice(1)):void 0,background:o[3]?m(o[3].slice(2,-1)):void 0,detail:o[4]?o[4].slice(2,-1).split(",").map(m):void 0,zoom:o[5]?"Zx"===o[5]?"x":parseFloat(o[5].slice(1)):void 0,detailsym:o[6]?o[6].match(new RegExp(c.detailsym,"g")).map((t=>{const e=t.split("_"),o=e[1].split(",").map(m);return{index:parseInt(e[0].slice(1)),detail:o}})):void 0,classes:o[7]?o[7]:void 0,id:o[8]?o[8]:void 0},Object.fromEntries(Object.entries(i).filter((([t,e])=>void 0!==e)));var i},g=t=>{if("object"!=typeof t||null===t)return;let e="-";e+=t.colorize?"C":"";const o=parseInt(t.padding);e+=!o||o<=0||o>99?"":"P"+(o>9?o:"0"+o);const i=t.background&&"string"==typeof t.background?t.background.match(c.colorbase)[0]:void 0;e+=i?"G_"+i+"_":"";const l=t.detail&&t.detail[0]&&"string"==typeof t.detail[0]?t.detail[0].match(c.colorbase)[0]:void 0,s=t.detail&&t.detail[1]&&"string"==typeof t.detail[1]?t.detail[1].match(c.colorbase)[0]:void 0;l&&(e+="D_"+l,s&&(e+=","+s),e+="_");const n="x"===t.zoom?"x":parseFloat(t.zoom);e+=!n||n<=0?"":"Z"+n;let a="";const d=t.detailsym&&Array.isArray(t.detailsym)?t.detailsym.map((t=>{const e=parseInt(t.index);if(!e||e<=0||e>99)return"";let o="D"+(e>9?e:"0"+e);const i=t.detail&&t.detail[0]?t.detail[0].match(c.colorbase)[0]:void 0,l=t.detail&&t.detail[1]?t.detail[1].match(c.colorbase)[0]:void 0;return i&&(o+="_"+i,l&&(o+=","+l),o+="_"),o})):[];a+=d.join("");let r="";const m=t.classes&&"string"==typeof t.classes?t.classes.match(c.classes)[0]:void 0;r+=m||"";const p=t.id&&"string"==typeof t.id?t.id.match(c.id)[0]:void 0;return r+=m||p?"!":"",r+=p?p+"!":"",e+(a||r?"-"+a:"")+(r?"-"+r:"")};let f={symbol:"(?:(?:\ud8c0[\udc01-\udfff])|(?:[\ud8c1-\ud8fc][\udc00-\udfff])|(?:\ud8fd[\udc00-\udc80]))",coord:"(?:\ud836[\udc0c-\uddff]){2}",sort:"𝠀",box:"\ud836[\udc01-\udc04]"};f.prefix=`(?:${f.sort}(?:${f.symbol})+)`,f.spatial=`${f.symbol}${f.coord}`,f.signbox=`${f.box}${f.coord}(?:${f.spatial})*`,f.sign=`${f.prefix}?${f.signbox}`,f.sortable=`${f.prefix}${f.signbox}`;let u={colorize:"C",colorhex:"(?:[0-9a-fA-F]{3}){1,2}",colorname:"[a-zA-Z]+",padding:"P[0-9]{2}",zoom:"Z(?:[0-9]+(?:\\.[0-9]+)?|x)",classbase:"-?[_a-zA-Z][_a-zA-Z0-9-]{0,100}",id:"[a-zA-Z][_a-zA-Z0-9-]{0,100}"};u.colorbase=`(?:${u.colorhex}|${u.colorname})`,u.color=`_${u.colorbase}_`,u.colors=`_${u.colorbase}(?:,${u.colorbase})?_`,u.background=`G${u.color}`,u.detail=`D${u.colors}`,u.detailsym=`D[0-9]{2}${u.colors}`,u.classes=`${u.classbase}(?: ${u.classbase})*`,u.full=`-(${u.colorize})?(${u.padding})?(${u.background})?(${u.detail})?(${u.zoom})?(?:-((?:${u.detailsym})*))?(?:-(${u.classes})?!(?:(${u.id})!)?)?`;const h=t=>(new RegExp(`^${u.colorhex}$`).test(t)?"#":"")+t,y=t=>{const e=`^${u.full}`,o=("string"==typeof t?t.match(new RegExp(e)):[])||[];return i={colorize:o[1]?!!o[1]:void 0,padding:o[2]?parseInt(o[2].slice(1)):void 0,background:o[3]?h(o[3].slice(2,-1)):void 0,detail:o[4]?o[4].slice(2,-1).split(",").map(h):void 0,zoom:o[5]?"Zx"===o[5]?"x":parseFloat(o[5].slice(1)):void 0,detailsym:o[6]?o[6].match(new RegExp(u.detailsym,"g")).map((t=>{const e=t.split("_"),o=e[1].split(",").map(h);return{index:parseInt(e[0].slice(1)),detail:o}})):void 0,classes:o[7]?o[7]:void 0,id:o[8]?o[8]:void 0},Object.fromEntries(Object.entries(i).filter((([t,e])=>void 0!==e)));var i},x=t=>parseInt(t.codePointAt(0))-120844+250,$=t=>[x(t.slice(0,2)),x(t.slice(2,4))],b=t=>{const e=`^(${f.symbol})(${f.coord})?(${u.full})?`,o="string"==typeof t?t.match(new RegExp(e)):void 0;return{symbol:o?o[1]:void 0,coord:o&&o[2]?$(o[2]):void 0,style:o?o[3]:void 0}},z=t=>{const e=`^(${f.prefix})?(${f.signbox})(${u.full})?`,o="string"==typeof t?t.match(new RegExp(e)):void 0;return o?{sequence:o[1]?o[1].slice(2).match(/.{2}/g):void 0,box:o[2].slice(0,2),max:$(o[2].slice(2,6)),spatials:o[2].length<7?void 0:o[2].slice(6).match(/(.{6})/g).map((t=>({symbol:t.slice(0,2),coord:$(t.slice(2))}))),style:o[3]}:{}},v=t=>{if("string"!=typeof t)return[];const e=`(${f.sign}(${u.full})?|${f.spatial}(${u.full})?)`,o=t.match(new RegExp(e,"g"));return o?[...o]:[]},w=t=>{let e,o,i,l,s,n,a,d,r=z(t);r.spatials?(l=Math.min(...r.spatials.map((t=>t.coord[0]))),s=r.max[0],e=s-l,n=Math.min(...r.spatials.map((t=>t.coord[1]))),a=r.max[1],o=a-n,i="sign",d=r.box):(r=b(t),d="𝠃",r.coord?(l=r.coord[0],e=2*(500-l),n=r.coord[1],o=2*(500-n),i="symbol"):(l=490,e=20,n=490,o=20,i="none"));let c=y(r.style),m=c.zoom||1,p=c.padding||0;return{minX:l,minY:n,width:e,height:o,segment:i,lane:{"𝠁":0,"𝠂":-1,"𝠃":0,"𝠄":1}[d],padding:p,zoom:m}},k={height:500,width:150,offset:50,pad:20,margin:5,dynamic:!1,background:void 0,punctuation:{spacing:!0,pad:30,pull:!0},style:{detail:["black","white"],zoom:1}},S=(t,e)=>{if("string"!=typeof t)return{};const o=(t=>("object"!=typeof t&&(t={}),{...k,...t,punctuation:{...k.punctuation,...t.punctuation},style:{...k.style,...t.style}}))(e);let i=v(t),l=0,s=[],n=[],a=0,d=parseInt(o.width/2),r=o.height-o.margin,c=!0,m=!1;for(let t of i){let e=w(t);l+=a,o.punctuation.spacing?l+="sign"==e.segment?o.pad:0:l+=o.pad,m=l+e.height>r,m&&"symbol"==e.segment&&o.punctuation.pull&&c&&(m=!1,c=!1),0==n.length&&(m=!1),m&&(l=o.pad,s.push(n),n=[],c=!0),n.push(Object.assign(e,{x:d+o.offset*e.lane-(500-e.minX)*e.zoom*o.style.zoom,y:l,text:t})),l+=e.height*e.zoom*o.style.zoom,a=o.punctuation.spacing?"sign"==e.segment?o.pad:o.punctuation.pad:o.pad}if(n.length&&s.push(n),o.punctuation.pull)for(let t of s){let e=t[t.length-1],i=e.y+e.height-(o.height-o.margin);if(i>0){let e=parseInt(i/t.length)+1;for(let o in t)t[o].y-=e*o+e}}let p=[];for(let t of s){let e=[d-o.offset-o.pad],i=[d+o.offset+o.pad];for(let l of t)e.push(l.x-o.pad),i.push(l.x+l.width+o.pad);e=Math.min(...e),i=Math.max(...i);let l=o.width,s=0;o.dynamic?(l=i-e,s=-e):s=d-parseInt((e+i)/2);for(let e of t)e.x+=s;p.push(l)}return{options:o,widths:p,columns:s}},I=[262145,287201,310433,311201,321761,323489,324257],_=[311201,321760],E=[311201,322624],j=["#0000CC","#CC0000","#FF0099","#006600","#000000","#884411","#FF9900"],A=t=>{const e=b(t);let o="#000000";if(e.symbol){const t=(t=>parseInt(t.codePointAt(0)))(e.symbol),i=I.findIndex((e=>e>t));o=j[i<0?6:i-1]}return o},M=t=>{const e=b(t);if(!e.symbol)return"";let o,i,s,n,a=p(e.style);if(e.coord)o=e.coord[0],i=e.coord[1],s=500-o+500,n=500-i+500;else{let t=l(e.symbol);if(!t)return"";o=500-parseInt((t[0]+1)/2),i=500-parseInt((t[1]+1)/2),s=500-o+500,n=500-i+500}let d,c=r(e.symbol);c=` <g transform="translate(${o},${i})">\n${c}\n </g>`,a.colorize?d=A(e.symbol):a.detail&&(d=a.detail[0]),d&&(c=c.replace(/class="sym-line" fill="black"/,`class="sym-line" fill="${d}"`));let m=a.detail&&a.detail[1];m&&(c=c.replace(/class="sym-fill" fill="white"/,`class="sym-fill" fill="${m}"`));let g="";return a.padding&&(o-=a.padding,i-=a.padding,s+=a.padding,n+=a.padding),a.background&&(g=`\n <rect x="${o}" y="${i}" width="${s-o}" height="${n-i}" style="fill:${a.background};" />`),` <text font-size="0">${t}</text>${g}\n${c}`},C=t=>{const e=b(t),o='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="1" height="1"></svg>';if(!e.symbol)return o;let i,s,n,a,d=p(e.style);if(e.coord)i=e.coord[0],s=e.coord[1],n=500-i+500,a=500-s+500;else{let t=l(e.symbol);if(!t)return o;i=parseInt(500-t[0]/2),s=parseInt(500-t[1]/2),n=i+t[0],a=s+t[1]}let r="";d.classes&&(r=` class="${d.classes}"`);let c="";d.id&&(c=` id="${d.id}"`),d.padding&&(i-=d.padding,s-=d.padding,n+=d.padding,a+=d.padding);let m="";return"x"!=d.zoom&&(m=` width="${(n-i)*(d.zoom?d.zoom:1)}" height="${(a-s)*(d.zoom?d.zoom:1)}"`),`<svg${r}${c} version="1.1" xmlns="http://www.w3.org/2000/svg"${m} viewBox="${i} ${s} ${n-i} ${a-s}">\n${M(t)}\n</svg>`},Z=t=>{const e=function(t){const e=b(t);if(e.symbol){let t=l(e.symbol);if(t){const o=document.createElement("canvas"),i=o.getContext("2d");let l=p(e.style),s="black";l.colorize?s=A(e.symbol):l.detail&&(s=l.detail[0]);let n=l.detail&&l.detail[1]||"white",r=500,c=r+t[0],m=500,g=m+t[1];l.padding&&(r-=l.padding,m-=l.padding,c+=l.padding,g+=l.padding);let f=1;"x"!=l.zoom&&(f=l.zoom);let u=(c-r)*f,h=(g-m)*f;return o.width=u||1,o.height=h||1,l.background&&(i.rect(0,0,u,h),i.fillStyle=l.background,i.fill()),i.font=30*f+"px 'SuttonSignWritingFill'",i.fillStyle=n,i.fillText(d(e.symbol),(500-r)*f,(500-m)*f),i.font=30*f+"px 'SuttonSignWritingLine'",i.fillStyle=s,i.fillText(a(e.symbol),(500-r)*f,(500-m)*f),o}}}(t),o=e.toDataURL("image/png");return e.remove(),o},R=e=>{const o=b(e);if(!o.symbol)return null;{let e=l(o.symbol);if(e)return`${o.symbol}${t([500-parseInt((e[0]+1)/2),500-parseInt((e[1]+1)/2)])}${o.style||""}`}},F=t=>{let e=z(t);if(e.spatials){let o=p(e.style);o.detailsym&&o.detailsym.forEach((t=>{e.spatials[t.index-1]&&(e.spatials[t.index-1].detail=t.detail)}));let i=Math.min(...e.spatials.map((t=>t.coord[0]))),l=Math.min(...e.spatials.map((t=>t.coord[1]))),s=e.max[0],n=e.max[1],a="";o.padding&&(i-=o.padding,l-=o.padding,s+=o.padding,n+=o.padding),o.background&&(a=`\n <rect x="${i}" y="${l}" width="${s-i}" height="${n-l}" style="fill:${o.background};" />`);let d=` <text font-size="0">${t}</text>${a}`;const c=o.detail&&o.detail[0],m=o.detail&&o.detail[1];return d+="\n"+e.spatials.map((t=>{let e=r(t.symbol),i=c;t.detail?i=t.detail[0]:o.colorize&&(i=A(t.symbol)),i&&(e=e.replace(/class="sym-line" fill="black"/,`class="sym-line" fill="${i}"`));let l=m;return t.detail&&t.detail[1]&&(l=t.detail[1]),l&&(e=e.replace(/class="sym-fill" fill="white"/,`class="sym-fill" fill="${l}"`)),` <g transform="translate(${t.coord[0]},${t.coord[1]})">\n${e}\n </g>`})).join("\n"),d}return""},D=t=>{let e=z(t);if(e.spatials){let o=p(e.style),i=Math.min(...e.spatials.map((t=>t.coord[0]))),l=Math.min(...e.spatials.map((t=>t.coord[1]))),s=e.max[0],n=e.max[1],a="";o.classes&&(a=` class="${o.classes}"`);let d="";o.id&&(d=` id="${o.id}"`),o.padding&&(i-=o.padding,l-=o.padding,s+=o.padding,n+=o.padding);let r="";"x"!=o.zoom&&(r=` width="${(s-i)*(o.zoom?o.zoom:1)}" height="${(n-l)*(o.zoom?o.zoom:1)}"`);let c=`<svg${a}${d} version="1.1" xmlns="http://www.w3.org/2000/svg"${r} viewBox="${i} ${l} ${s-i} ${n-l}">\n`;return c+=F(t),c+="\n</svg>",c}return'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="1" height="1"></svg>'},P=t=>{const e=function(t){const e=z(t);if(e.spatials){const t=document.createElement("canvas"),o=t.getContext("2d");let i=p(e.style);i.detailsym&&i.detailsym.forEach((t=>{e.spatials[t.index-1]&&(e.spatials[t.index-1].detail=t.detail)}));let l=Math.min(...e.spatials.map((t=>t.coord[0]))),s=Math.min(...e.spatials.map((t=>t.coord[1]))),n=e.max[0],r=e.max[1];i.padding&&(l-=i.padding,s-=i.padding,n+=i.padding,r+=i.padding);let c=1;"x"!=i.zoom&&(c=i.zoom);let m=(n-l)*c,g=(r-s)*c;t.width=m||1,t.height=g||1,i.background&&(o.rect(0,0,m,g),o.fillStyle=i.background,o.fill());const f=i.detail&&i.detail[0]||"black",u=i.detail&&i.detail[1]||"white";return e.spatials.forEach((t=>{let e=f;t.detail?e=t.detail[0]:i.colorize&&(e=A(t.symbol));let n=u;t.detail&&t.detail[1]&&(n=t.detail[1]),o.font=30*c+"px 'SuttonSignWritingFill'",o.fillStyle=n,o.fillText(d(t.symbol),(t.coord[0]-l)*c,(t.coord[1]-s)*c),o.font=30*c+"px 'SuttonSignWritingLine'",o.fillStyle=e,o.fillText(a(t.symbol),(t.coord[0]-l)*c,(t.coord[1]-s)*c)})),t}}(t),o=e.toDataURL("image/png");return e.remove(),o},O=e=>{const o=z(e);if(o.spatials){const e=o.spatials.reduce(((t,e)=>{const o=l(e.symbol);return t[e.symbol]={width:o[0],height:o[1]},t}),{}),i=t=>({x1:Math.min(...t.map((t=>t.coord[0]))),y1:Math.min(...t.map((t=>t.coord[1]))),x2:Math.max(...t.map((t=>t.coord[0]+parseInt(e[t.symbol].width)))),y2:Math.max(...t.map((t=>t.coord[1]+parseInt(e[t.symbol].height))))}),s=_,n=o.spatials.filter((t=>{const e=parseInt(t.symbol.slice(1,4),16);return s[0]<=e&&s[1]>=e})),a=E,d=o.spatials.filter((t=>{const e=parseInt(t.symbol.slice(1,4),16);return a[0]<=e&&a[1]>=e}));let r=i(o.spatials),c=[r.x2,r.y2];if(n.length){const t=i(n);r.x1=t.x1,r.x2=t.x2}if(d.length){const t=i(d);r.y1=t.y1,r.y2=t.y2}const m=[parseInt((r.x2+r.x1)/2)-500,parseInt((r.y2+r.y1)/2)-500];return(o.sequence?"𝠀"+o.sequence.join(""):"")+o.box+t([c[0]-m[0],c[1]-m[1]])+o.spatials.map((e=>e.symbol+t([e.coord[0]-m[0],e.coord[1]-m[1]]))).join("")+(o.style||"")}},W=(t,e)=>{"object"!=typeof e&&(e={});const o=Object.assign(k,e);let i=o.width,l=o.height,s="";o.background&&(s=`\n <rect x="0" y="0" width="${i-0}" height="${l-0}" style="fill:${o.background};" />`);let n=`<svg version="1.1" xmlns="http://www.w3.org/2000/svg"${` width="${o.width}" height="${o.height}"`} viewBox="0 0 ${i-0} ${l-0}">\n <text font-size="0">0</text>${s}`;return n+=t.map((t=>{const e=t.text.indexOf("-");if(e>0){const i=t.text.substring(e),l={...o.style,...p(i)};t.text=t.text.replace(i,g(l))}else t.text+=g(o.style);return t.zoom=t.zoom*o.style.zoom,'<g transform="translate('+t.x+","+t.y+") scale("+t.zoom+") translate("+-t.minX+","+-t.minY+') ">'+("sign"==t.segment?F(t.text):M(t.text))+"</g>"})).join("\n"),n+="\n</svg>",n},L=function(t,e){"object"!=typeof e&&(e={});let o=S(t,e);return o.columns.map(((t,e)=>W(t,{...o.options,width:o.widths[e]})))},T=(t,e)=>{const o=function(t,e){"object"!=typeof e&&(e={});const o=Object.assign(k,e),i=document.createElement("canvas");i.width=o.width,i.height=o.height;const l=i.getContext("2d");return o.background&&(l.rect(0,0,o.width,o.height),l.fillStyle=o.background,l.fill()),t.map((t=>{const e=t.text.indexOf("-");if(e>0){const i=t.text.substring(e),l={...o.style,...p(i)};t.text=t.text.replace(i,g(l))}else t.text+=g(o.style);t.zoom=t.zoom*o.style.zoom;let i={};if("sign"==t.segment)i=z(t.text);else{let e=b(t.text);i.style=e.style,i.spatials=[e]}let s=p(i.style);s.background&&(l.fillStyle=s.background,l.fillRect(t.x-s.padding*t.zoom,t.y-s.padding*t.zoom,(t.width+2*s.padding)*t.zoom,(t.height+2*s.padding)*t.zoom)),s.detailsym&&s.detailsym.forEach((t=>{i.spatials[t.index-1]&&(i.spatials[t.index-1].detail=t.detail)}));const n=s.detail&&s.detail[0]||"black",r=s.detail&&s.detail[1]||"white";i.spatials.forEach((e=>{let o=n;e.detail?o=e.detail[0]:s.colorize&&(o=A(e.symbol));let i=r;e.detail&&e.detail[1]&&(i=e.detail[1]),l.font=30*t.zoom+"px 'SuttonSignWritingFill'",l.fillStyle=i,l.fillText(d(e.symbol),t.x+(e.coord[0]-t.minX)*t.zoom,t.y+(e.coord[1]-t.minY)*t.zoom),l.font=30*t.zoom+"px 'SuttonSignWritingLine'",l.fillStyle=o,l.fillText(a(e.symbol),t.x+(e.coord[0]-t.minX)*t.zoom,t.y+(e.coord[1]-t.minY)*t.zoom)}))})),i}(t,e),i=o.toDataURL("image/png");return o.remove(),i},X=function(t,e){"object"!=typeof e&&(e={});let o=S(t,e);return o.columns.map(((t,e)=>T(t,{...o.options,width:o.widths[e]})))};export{T as columnPng,W as columnSvg,X as columnsPng,L as columnsSvg,O as signNormalize,P as signPng,D as signSvg,F as signSvgBody,d as symbolFill,a as symbolLine,R as symbolNormalize,Z as symbolPng,l as symbolSize,C as symbolSvg,M as symbolSvgBody,r as symbolText};