Leon Sans is a geometric sans-serif typeface made with code in 2019 by Jongmin Kim.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

8 lines
64 KiB

/*!
5 years ago
* VERSION: 1.6.4
* DATE: 2020-03-29
* https://leon-sans.com
*
5 years ago
* @license Copyright (c) 2019-2020, Jongmin Kim. All rights reserved.
**/
5 years ago
var LeonSans=function(t){var r={};function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var i in t)e.d(n,i,function(r){return t[r]}.bind(null,i));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=0)}([function(t,r,e){var n=e(1).default;t.exports=n},function(t,r,e){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}e.r(r),e.d(r,"default",(function(){return hr}));var a=function(){function t(){!function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,t),this.handlers_={update:{listeners:[]}}}var r,e,a;return r=t,(e=[{key:"on",value:function(t,r){return"function"!=typeof r?(console.error("The listener callback must be a function, the given type is ".concat(n(r))),!1):"string"!=typeof t?(console.error("The event name must be a string, the given type is ".concat(n(t))),!1):(void 0===this.handlers_[t]&&(this.handlers_[t]={listeners:[]}),void this.handlers_[t].listeners.push(r))}},{key:"off",value:function(t,r){if(void 0===this.handlers_[t])return console.error("This event: ".concat(t," does not exist")),!1;this.handlers_[t].listeners=this.handlers_[t].listeners.filter((function(t){return t.toString()!==r.toString()}))}},{key:"dispatch",value:function(t,r){this.handlers_[t].listeners.forEach((function(t){t(r)}))}}])&&i(r.prototype,e),a&&i(r,a),t}(),s=2*Math.PI;function o(t,r){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=.49*t.rect.w*r,a=.49*(t.rect.h+220)*r;return{x:e,y:n,w:i,h:a}}function f(t,r,e){return{x:t/2,y:(r-130*.49*e)/2}}function l(t,r,e){return{r:r,cr:e,fr1:1,fr2:.78,gx1:t.ratio.x1,gx2:t.ratio.x2,gy1:t.ratio.y1,gy2:t.ratio.y2}}function y(t,r,e,n,i){var a=(n-i)/(r-e)*(t-e)+i;return a<i?a=i:a>n&&(a=n),a}function c(t){var r,e,n,i,a,s,o,f,l,c,h,u=t.typo.p.length,d=[];for(r=0;r<u;r++)for(i=(a=t.typo.p[r]).cv.length,e=0;e<i;e++){if(o=(s=a.cv[e]).addRect(t.rect),f=a.d,c=(l=t.pointsLength.lengths[r])/t.pointsLength.max,h=0,r>0)for(n=0;n<r;n++)h+=t.pointsLength.lengths[n]/t.pointsLength.max;c+=h,d.push({pos:o,drawing:t.drawing,direction:f,lengths:l,maxDrawing:c,minDrawing:h,closePath:s.ratio.c,stroke:function(t,r){var e=y(r.drawing.value,r.maxDrawing,r.minDrawing,1,0);if(e>0&&"a"!=r.pos.type){var n=r.lengths*e;t.setLineDash([r.lengths]),t.lineDashOffset=r.direction*(n+r.lengths),t.stroke()}}})}return d}function h(t,r){var e,n,i=t.length,a=[];for(e=0;e<i;e++)n=t[e].addRect(r.rect),a.push(n);return a}function u(t){for(var r,e,n=t.slice(),i=n.length,a=i;a--;)r=Math.random()*i|0,e=n[a],n[a]=n[r],n[r]=e;return n}function d(t,r){var e,n,i,a=r.lines.length;for(e=0;e<a;e++)"a"==(i=(n=r.lines[e]).pos).type?(t.beginPath(),t.arc(i.x,i.y,i.radius*n.drawing.value,0,s),t.fill(),t.closePath()):"m"==i.type?(t.beginPath(),t.moveTo(i.x,i.y)):"l"==i.type?t.lineTo(i.x,i.y):"b"==i.type&&t.bezierCurveTo(i.x,i.y,i.x2,i.y2,i.x3,i.y3),n.stroke(t,n)}function p(t,r){t.save(),t.lineWidth=1;var e,n=r.lines.length;for(e=0;e<n;e++)g(t,r.lines[e]);for(t.restore(),t.save(),t.