diff --git a/font.js b/font.js index c1b8fd9..53120b0 100644 --- a/font.js +++ b/font.js @@ -1,15 +1,14 @@ { - var r0_font, r0_bezierCubic2Q2, r0_glyphList, r0_glyphs, r0_Bezier, r0_Smooth, r0_intersection, r0_para, r0_TINY, r0_LITTLE, r0_DESCENDER, r0_O, r0_WIDTH, r0_STROKE, r0_HALFSTROKE, r0_SB, r0_CAP, r0_XH, r0_XO, r0_HOOK, r0_SMOOTH, r0_SMALLSMOOTH, r0_RIGHTSB, r0_CAP_SMOOTH, r0_MIDDLE, r0_KAPPA, r0_COKAPPA, r0_COBKAPPA, r0_BKAPPA, r0_CAPMIDDLE, r0_CAPO, r0_ESS, r0_SAMPLES, r0_KAPPA_HOOK, r0_Glyph, r0_Stroke, r0_dforward, r0_dbackward, r0_nonlinear, r0_Ring, r0_ORing, r0_xn$createglyph$7Hrq, _r0_t0, _r0_t1, _r0_t2, _r0_t3, _r0_t4, _r0_t5, _r0_t6, _r0_t7, _r0_t8, _r0_t9, _r0_t10, _r0_t11, _r0_t12, _r0_t13, _r0_t14, _r0_t15, _r0_t16, _r0_t17, _r0_t18, _r0_t19, _r0_t20, _r0_t21, _r0_t22, _r0_t23, _r0_t24, _r0_t25, _r0_t26, _r0_t27, _r0_t28, _r0_t29, _r0_t30, _r0_t31, _r0_t32, _r0_t33, _r0_t34, _r0_t35, _r0_t36, _r0_t37, _r0_t38, _r0_t39, _r0_t40, _r0_t41, _r0_t42, _r0_t43, _r0_t44, _r0_t45, _r0_t46, _r0_t47, _r0_t48; + var r0_font, r0_glyphList, r0_glyphs, r0_Glyph, r0_Stroke, r0_para, r0_variantSelector, r0_DESCENDER, r0_WIDTH, r0_CAP, r0_XH, r0_O, r0_SB, r0_HOOK, r0_SMOOTH, r0_SMALLSMOOTH, r0_STROKE, r0_DOTSIZE, r0_XO, r0_CAPO, r0_HALFSTROKE, r0_RIGHTSB, r0_MIDDLE, r0_CAPMIDDLE, r0_CAP_SMOOTH, r0_DOTRADIUS, r0_KAPPA, r0_COKAPPA, r0_COBKAPPA, r0_BKAPPA, r0_KAPPA_HOOK, r0_Ring, r0_ORing, r0_xn$createglyph$7Hrq, _r0_t0, _r0_t1, _r0_t2, _r0_t3, _r0_t4, _r0_t5, _r0_t6, _r0_t7, _r0_t8, _r0_t9, _r0_t10, _r0_t11, _r0_t12, _r0_t13, _r0_t14, _r0_t15, _r0_t16, _r0_t17, _r0_t18, _r0_t19, _r0_t20, _r0_t21, _r0_t22, _r0_t23, _r0_t24, _r0_t25, _r0_t26, _r0_t27, _r0_t28, _r0_t29, _r0_t30, _r0_t31, _r0_t32; r0_font = require('./empty.json'); - r0_bezierCubic2Q2 = require('node-sfnt/lib/math/bezierCubic2Q2'); r0_glyphList = r0_font['glyf']; r0_glyphs = { '.notdef': r0_glyphList[0] }; - r0_Bezier = require('bezier-js'); - r0_Smooth = require('./smooth.js')['Smooth']; - r0_intersection = require('./intersection.js')['intersection']; + r0_Glyph = require('./support/glyph')['Glyph']; + r0_Stroke = require('./support/stroke')['Stroke']; r0_para = { 'width': 500, 'stroke': 85, + 'dotsize': 100, 'sb': 50, 'cap': 771, 'xheight': 572, @@ -17,572 +16,429 @@ 'smooth': 192, 'smallsmooth': 242, 'o': -8, - 'descender': -178 + 'descender': -178, + 'kappa': 0.51 }; - r0_TINY = 0.0001; - r0_LITTLE = 0.01; + r0_variantSelector = { 'zero': 'slashed' }; r0_DESCENDER = r0_para['descender']; - r0_O = r0_para['o']; r0_WIDTH = r0_para['width']; - r0_STROKE = r0_para['stroke']; - r0_HALFSTROKE = r0_STROKE / 2; - r0_SB = r0_para['sb']; r0_CAP = r0_para['cap']; r0_XH = r0_para['xheight']; - r0_XO = r0_XH - r0_O; + r0_O = r0_para['o']; + r0_SB = r0_para['sb']; r0_HOOK = r0_para['hook']; r0_SMOOTH = r0_para['smooth']; r0_SMALLSMOOTH = r0_para['smallsmooth']; + r0_STROKE = r0_para['stroke']; + r0_DOTSIZE = r0_para['dotsize']; + r0_XO = r0_XH - r0_O; + r0_CAPO = r0_CAP - r0_O; + r0_HALFSTROKE = r0_STROKE / 2; r0_RIGHTSB = r0_WIDTH - r0_SB; - r0_CAP_SMOOTH = r0_CAP - r0_SMOOTH; r0_MIDDLE = r0_WIDTH / 2; - r0_KAPPA = 0.51; + r0_CAPMIDDLE = r0_CAP / 2; + r0_CAP_SMOOTH = r0_CAP - r0_SMOOTH; + r0_DOTRADIUS = r0_para['dotsize'] / 2; + r0_KAPPA = r0_para['kappa']; r0_COKAPPA = 1 - r0_KAPPA; r0_COBKAPPA = r0_COKAPPA - 0.1; r0_BKAPPA = r0_KAPPA + 0.1; - r0_CAPMIDDLE = r0_CAP / 2; - r0_CAPO = r0_CAP - r0_O; - r0_ESS = r0_STROKE * 0.5; - r0_SAMPLES = 4; r0_KAPPA_HOOK = 0.7; - r0_Glyph = function _r0_t0(r1_name) { - var r1_name, _r1_t0; - _r1_t0 = this; - _r1_t0['name'] = r1_name; - _r1_t0['unicode'] = []; - _r1_t0['contours'] = []; - _r1_t0['advanceWidth'] = 500; - return void 0; + r0_Stroke['bindParameters'](r0_para); + r0_Ring = function _r0_t0(r1_u, r1_d, r1_l, r1_r) { + var r1_u, r1_d, r1_l, r1_r, r1_my, r1_mx, r1_s; + r1_my = (r1_u + r1_d) / 2; + r1_mx = (r1_l + r1_r) / 2; + r1_s = new r0_Stroke()['start-from'](r1_mx, r1_d)['cubic-to'](r1_mx + (r1_l - r1_mx) * r0_BKAPPA, r1_d, r1_l, r1_my + (r1_d - r1_my) * r0_BKAPPA, r1_l, r1_my)['cubic-to'](r1_l, r1_my + (r1_u - r1_my) * r0_BKAPPA, r1_mx + (r1_l - r1_mx) * r0_BKAPPA, r1_u, r1_mx, r1_u)['cubic-to'](r1_mx + (r1_r - r1_mx) * r0_BKAPPA, r1_u, r1_r, r1_my + (r1_u - r1_my) * r0_BKAPPA, r1_r, r1_my)['cubic-to'](r1_r, r1_my + (r1_d - r1_my) * r0_BKAPPA, r1_mx + (r1_r - r1_mx) * r0_BKAPPA, r1_d, r1_mx, r1_d); + return r1_s['points']; }; - r0_Glyph['prototype']['set-width'] = function _r0_t1(r2_w) { - var r2_w, _r2_t0; - _r2_t0 = this; - _r2_t0['advanceWidth'] = r2_w; - return _r2_t0; + r0_ORing = function _r0_t1(r2_u, r2_d, r2_l, r2_r, r2_smooth) { + var r2_u, r2_d, r2_l, r2_r, r2_smooth, r2_myu, r2_myd, r2_mx, r2_s; + r2_myu = r2_u - r2_smooth; + r2_myd = r2_d + r2_smooth; + r2_mx = (r2_l + r2_r) / 2; + r2_s = new r0_Stroke()['start-from'](r2_mx, r2_d)['cubic-to'](r2_mx + (r2_l - r2_mx) * r0_BKAPPA, r2_d, r2_l, r2_myd + (r2_d - r2_myd) * r0_BKAPPA, r2_l, r2_myd)['line-to'](r2_l, r2_myu)['cubic-to'](r2_l, r2_myu + (r2_u - r2_myu) * r0_BKAPPA, r2_mx + (r2_l - r2_mx) * r0_BKAPPA, r2_u, r2_mx, r2_u)['cubic-to'](r2_mx + (r2_r - r2_mx) * r0_BKAPPA, r2_u, r2_r, r2_myu + (r2_u - r2_myu) * r0_BKAPPA, r2_r, r2_myu)['line-to'](r2_r, r2_myd)['cubic-to'](r2_r, r2_myd + (r2_d - r2_myd) * r0_BKAPPA, r2_mx + (r2_r - r2_mx) * r0_BKAPPA, r2_d, r2_mx, r2_d); + return r2_s['points']; }; - r0_Glyph['prototype']['assign-unicode'] = function _r0_t2(r3_u) { - var r3_u, _r3_t0; - _r3_t0 = this; - _r3_t0['unicode']['push'](r3_u['charCodeAt'](0)); - return _r3_t0; + r0_xn$createglyph$7Hrq = function _r0_t2(r7_name, r7_actions) { + var r7_name, r7_actions, r7_glyphObject; + r7_glyphObject = new r0_Glyph(r7_name); + r0_glyphList['push'](r7_glyphObject); + r0_glyphs[r7_name] = r7_glyphObject; + r7_actions['call'](r7_glyphObject); + return r7_glyphObject; }; - r0_Glyph['prototype']['start-from'] = function _r0_t3(r4_x, r4_y) { - var r4_x, r4_y, _r4_t0; - _r4_t0 = this; - _r4_t0['contours']['push']([{ - 'x': r4_x, - 'y': r4_y, - 'onCurve': true - }]); - return _r4_t0; - }; - r0_Glyph['prototype']['line-to'] = function _r0_t4(r5_x, r5_y) { - var r5_x, r5_y, _r5_t0; - _r5_t0 = this; - _r5_t0['contours'][_r5_t0['contours']['length'] - 1]['push']({ - 'x': r5_x, - 'y': r5_y, - 'onCurve': true - }); - return _r5_t0; - }; - r0_Glyph['prototype']['curve-to'] = function _r0_t5(r6_xc, r6_yc, r6_x, r6_y) { - var r6_xc, r6_yc, r6_x, r6_y, _r6_t0; - _r6_t0 = this; - _r6_t0['contours'][_r6_t0['contours']['length'] - 1]['push']({ - 'x': r6_xc, - 'y': r6_yc, - 'onCurve': false - }, { - 'x': r6_x, - 'y': r6_y, - 'onCurve': true - }); - return _r6_t0; - }; - r0_Glyph['prototype']['cubic-to'] = function _r0_t6(r7_x1, r7_y1, r7_x2, r7_y2, r7_x, r7_y) { - var r7_x1, r7_y1, r7_x2, r7_y2, r7_x, r7_y, r7_lastContour, r7_lastPoint, r7_segments, r7_p0, r7_xc, r7_yc, r7_xf, r7_yf, _r7_t0, _r7_t1, _r7_t2, _r7_t3, _r7_t4, _r7_t5, _r7_t6; - _r7_t6 = this; - r7_lastContour = _r7_t6['contours'][_r7_t6['contours']['length'] - 1]; - r7_lastPoint = r7_lastContour[r7_lastContour['length'] - 1]; - r7_segments = r0_bezierCubic2Q2(r7_lastPoint, { - 'x': r7_x1, - 'y': r7_y1 - }, { - 'x': r7_x2, - 'y': r7_y2 - }, { - 'x': r7_x, - 'y': r7_y - }); - _r7_t0 = r7_segments; - _r7_t1 = _r7_t0['length']; - _r7_t2 = 0; - for (; _r7_t2 < _r7_t1; _r7_t2 = _r7_t2 + 1) { - _r7_t3 = _r7_t0[_r7_t2]; - r7_p0 = _r7_t3[0]; - _r7_t4 = _r7_t3[1]; - r7_xc = _r7_t4['x']; - r7_yc = _r7_t4['y']; - _r7_t5 = _r7_t3[2]; - r7_xf = _r7_t5['x']; - r7_yf = _r7_t5['y']; - _r7_t6['curve-to'](r7_xc, r7_yc, r7_xf, r7_yf); - } - return _r7_t6; - }; - r0_Glyph['prototype']['reverse-last'] = function _r0_t7() { - var _r9_t0; + r0_xn$createglyph$7Hrq('space', function _r0_t3() { + var r9_xn$setwidth$9Jrj, r9_xn$assignunicode$7Hrq, r9_xn$startfrom$1aao, r9_xn$lineto$5sIl, r9_xn$curveto$1aao, r9_xn$cubicto$1aao, r9_xn$putshapes$9Jrj, r9_xn$reverselast$3qIs, r9_xn$includeglyph$3qIs, _r9_t0; _r9_t0 = this; - return _r9_t0['contours'][_r9_t0['contours']['length'] - 1] = _r9_t0['contours'][_r9_t0['contours']['length'] - 1]['reverse'](); - }; - r0_Glyph['prototype']['put-shapes'] = function _r0_t8(r10_contours) { - var r10_contours, r10_contour, r10_j, r10_point, r10_p2, r10_p3, _r10_t0, _r10_t1, _r10_t2, _r10_t3; - _r10_t3 = this; - _r10_t0 = r10_contours; - _r10_t1 = _r10_t0['length']; - _r10_t2 = 0; - for (; _r10_t2 < _r10_t1; _r10_t2 = _r10_t2 + 1) { - r10_contour = _r10_t0[_r10_t2]; - _r10_t3['start-from'](r10_contour[0]['x'], r10_contour[0]['y']); - r10_j = 1; - for (; r10_j < r10_contour['length']; r10_j = r10_j + 1) { - r10_point = r10_contour[r10_j]; - if (r10_point['cubic']) { - r10_p2 = r10_contour[r10_j + 1]; - r10_p3 = r10_contour[r10_j + 2]; - _r10_t3['cubic-to'](r10_point['x'], r10_point['y'], r10_p2['x'], r10_p2['y'], r10_p3['x'], r10_p3['y']); - r10_j = r10_j + 2; - } else if (r10_point['onCurve']) - _r10_t3['line-to'](r10_point['x'], r10_point['y']); - else { - r10_p2 = r10_contour[r10_j + 1]; - _r10_t3['curve-to'](r10_point['x'], r10_point['y'], r10_p2['x'], r10_p2['y']); - r10_j = r10_j + 1; - } - } - } - return _r10_t3; - }; - r0_Stroke = function _r0_t9() { - var _r12_t0; - _r12_t0 = this; - _r12_t0['points'] = []; - return _r12_t0; - }; - r0_Stroke['prototype']['set-width'] = function _r0_t10(r13_d1, r13_d2) { - var r13_d1, r13_d2, r13_point, _r13_t0; + r9_xn$setwidth$9Jrj = _r9_t0['set-width']['bind'](_r9_t0); + r9_xn$assignunicode$7Hrq = _r9_t0['assign-unicode']['bind'](_r9_t0); + r9_xn$startfrom$1aao = _r9_t0['start-from']['bind'](_r9_t0); + r9_xn$lineto$5sIl = _r9_t0['line-to']['bind'](_r9_t0); + r9_xn$curveto$1aao = _r9_t0['curve-to']['bind'](_r9_t0); + r9_xn$cubicto$1aao = _r9_t0['cubic-to']['bind'](_r9_t0); + r9_xn$putshapes$9Jrj = _r9_t0['put-shapes']['bind'](_r9_t0); + r9_xn$reverselast$3qIs = _r9_t0['reverse-last']['bind'](_r9_t0); + r9_xn$includeglyph$3qIs = _r9_t0['include-glyph']['bind'](_r9_t0); + r9_xn$setwidth$9Jrj(r0_WIDTH); + r9_xn$assignunicode$7Hrq(' '); + return void 0; + }); + r0_xn$createglyph$7Hrq('bar', function _r0_t4() { + var r11_xn$setwidth$9Jrj, r11_xn$assignunicode$7Hrq, r11_xn$startfrom$1aao, r11_xn$lineto$5sIl, r11_xn$curveto$1aao, r11_xn$cubicto$1aao, r11_xn$putshapes$9Jrj, r11_xn$reverselast$3qIs, r11_xn$includeglyph$3qIs, _r11_t0; + _r11_t0 = this; + r11_xn$setwidth$9Jrj = _r11_t0['set-width']['bind'](_r11_t0); + r11_xn$assignunicode$7Hrq = _r11_t0['assign-unicode']['bind'](_r11_t0); + r11_xn$startfrom$1aao = _r11_t0['start-from']['bind'](_r11_t0); + r11_xn$lineto$5sIl = _r11_t0['line-to']['bind'](_r11_t0); + r11_xn$curveto$1aao = _r11_t0['curve-to']['bind'](_r11_t0); + r11_xn$cubicto$1aao = _r11_t0['cubic-to']['bind'](_r11_t0); + r11_xn$putshapes$9Jrj = _r11_t0['put-shapes']['bind'](_r11_t0); + r11_xn$reverselast$3qIs = _r11_t0['reverse-last']['bind'](_r11_t0); + r11_xn$includeglyph$3qIs = _r11_t0['include-glyph']['bind'](_r11_t0); + r11_xn$setwidth$9Jrj(r0_WIDTH); + r11_xn$assignunicode$7Hrq('|'); + r11_xn$putshapes$9Jrj(new r0_Stroke()['start-from'](r0_MIDDLE, r0_DESCENDER / 2)['set-width'](r0_STROKE / 2, r0_STROKE / 2)['line-to'](r0_MIDDLE, r0_CAP - r0_DESCENDER / 2)['form-stroke']()); + return void 0; + }); + r0_xn$createglyph$7Hrq('A', function _r0_t5() { + var r13_xn$setwidth$9Jrj, r13_xn$assignunicode$7Hrq, r13_xn$startfrom$1aao, r13_xn$lineto$5sIl, r13_xn$curveto$1aao, r13_xn$cubicto$1aao, r13_xn$putshapes$9Jrj, r13_xn$reverselast$3qIs, r13_xn$includeglyph$3qIs, r13_TURN, r13_leftbar, r13_rightbar, r13_hbar, _r13_t0; _r13_t0 = this; - r13_point = _r13_t0['points'][_r13_t0['points']['length'] - 1]; - r13_point['d1'] = r13_d1; - r13_point['d2'] = r13_d2; - return _r13_t0; - }; - r0_Stroke['prototype']['start-from'] = function _r0_t11(r14_x, r14_y) { - var r14_x, r14_y, _r14_t0; - _r14_t0 = this; - _r14_t0['points'] = [{ - 'x': r14_x, - 'y': r14_y, - 'onCurve': true - }]; - return _r14_t0; - }; - r0_Stroke['prototype']['line-to'] = function _r0_t12(r15_x, r15_y) { - var r15_x, r15_y, _r15_t0; + r13_xn$setwidth$9Jrj = _r13_t0['set-width']['bind'](_r13_t0); + r13_xn$assignunicode$7Hrq = _r13_t0['assign-unicode']['bind'](_r13_t0); + r13_xn$startfrom$1aao = _r13_t0['start-from']['bind'](_r13_t0); + r13_xn$lineto$5sIl = _r13_t0['line-to']['bind'](_r13_t0); + r13_xn$curveto$1aao = _r13_t0['curve-to']['bind'](_r13_t0); + r13_xn$cubicto$1aao = _r13_t0['cubic-to']['bind'](_r13_t0); + r13_xn$putshapes$9Jrj = _r13_t0['put-shapes']['bind'](_r13_t0); + r13_xn$reverselast$3qIs = _r13_t0['reverse-last']['bind'](_r13_t0); + r13_xn$includeglyph$3qIs = _r13_t0['include-glyph']['bind'](_r13_t0); + r13_xn$setwidth$9Jrj(r0_WIDTH); + r13_xn$assignunicode$7Hrq('A'); + r13_TURN = r0_XH * 0.1; + r13_leftbar = new r0_Stroke(); + r13_leftbar['start-from'](r0_SB, 0)['line-to'](r0_SB, r13_TURN)['curve-to'](r0_SB, r13_TURN + 0.27 * (r0_CAP - r13_TURN), r0_MIDDLE - r0_STROKE / 2, r0_CAP); + r13_rightbar = new r0_Stroke(); + r13_rightbar['start-from'](r0_RIGHTSB, 0)['line-to'](r0_RIGHTSB, r13_TURN)['curve-to'](r0_RIGHTSB, r13_TURN + 0.27 * (r0_CAP - r13_TURN), r0_MIDDLE + r0_STROKE / 2, r0_CAP); + r13_hbar = new r0_Stroke(); + r13_hbar['start-from'](r0_SB + r0_STROKE, r0_XH / 2)['line-to'](r0_RIGHTSB - r0_STROKE, r0_XH / 2); + r13_xn$putshapes$9Jrj(r13_leftbar['form-stroke'](0, r0_STROKE)); + r13_xn$putshapes$9Jrj(r13_hbar['form-stroke'](0, r0_STROKE)); + r13_xn$putshapes$9Jrj(r13_rightbar['form-stroke'](r0_STROKE, 0)); + r13_xn$startfrom$1aao(r0_MIDDLE - r0_STROKE / 2, r0_CAP); + r13_xn$lineto$5sIl(r0_MIDDLE + r0_STROKE / 2, r0_CAP); + r13_xn$lineto$5sIl(r0_MIDDLE, r0_CAP - r0_STROKE); + return void 0; + }); + r0_xn$createglyph$7Hrq('X', function _r0_t6() { + var r15_xn$setwidth$9Jrj, r15_xn$assignunicode$7Hrq, r15_xn$startfrom$1aao, r15_xn$lineto$5sIl, r15_xn$curveto$1aao, r15_xn$cubicto$1aao, r15_xn$putshapes$9Jrj, r15_xn$reverselast$3qIs, r15_xn$includeglyph$3qIs, r15_TURN, r15_straight, r15_strench, r15_barone, r15_bartwo, _r15_t0, _r15_t1; _r15_t0 = this; - _r15_t0['points']['push']({ - 'x': r15_x, - 'y': r15_y, - 'onCurve': true - }); - return _r15_t0; - }; - r0_Stroke['prototype']['curve-to'] = function _r0_t13(r16_xc, r16_yc, r16_x, r16_y) { - var r16_xc, r16_yc, r16_x, r16_y, _r16_t0; - _r16_t0 = this; - _r16_t0['points']['push']({ - 'x': r16_xc, - 'y': r16_yc, - 'onCurve': false - }, { - 'x': r16_x, - 'y': r16_y, - 'onCurve': true - }); - return _r16_t0; - }; - r0_Stroke['prototype']['cubic-to'] = function _r0_t14(r17_x1, r17_y1, r17_x2, r17_y2, r17_x, r17_y) { - var r17_x1, r17_y1, r17_x2, r17_y2, r17_x, r17_y, _r17_t0; - _r17_t0 = this; - _r17_t0['points']['push']({ - 'x': r17_x1, - 'y': r17_y1, - 'onCurve': false, - 'cubic': true - }, { - 'x': r17_x2, - 'y': r17_y2, - 'onCurve': false, - 'cubic': true - }, { - 'x': r17_x, - 'y': r17_y, - 'onCurve': true - }); - return _r17_t0; - }; - r0_Stroke['prototype']['arc-vh-to'] = function _r0_t15(r18_x, r18_y) { - var r18_x, r18_y, r18_last, _r18_t0; - _r18_t0 = this; - r18_last = _r18_t0['points'][_r18_t0['points']['length'] - 1]; - _r18_t0['cubic-to'](r18_last['x'], r18_last['y'] + r0_BKAPPA * (r18_y - r18_last['y']), r18_x + r0_BKAPPA * (r18_last['x'] - r18_x), r18_y, r18_x, r18_y); - return _r18_t0; - }; - r0_Stroke['prototype']['arc-hv-to'] = function _r0_t16(r19_x, r19_y) { - var r19_x, r19_y, r19_last, _r19_t0; - _r19_t0 = this; - r19_last = _r19_t0['points'][_r19_t0['points']['length'] - 1]; - _r19_t0['cubic-to'](r19_last['x'] + r0_BKAPPA * (r19_x - r19_last['x']), r19_last['y'], r19_x, r19_y + r0_BKAPPA * (r19_last['y'] - r19_y), r19_x, r19_y); - return _r19_t0; - }; - r0_dforward = function _r0_t17(r20_p0, r20_p1, r20_p2, r20_p3) { - var r20_p0, r20_p1, r20_p2, r20_p3; - return { - 'x': r20_p0['x'] + (-11 / 6 * r20_p0['x'] + 3 * r20_p1['x'] - 3 / 2 * r20_p2['x'] + r20_p3['x'] / 3) / r0_TINY * r0_LITTLE, - 'y': r20_p0['y'] + (-11 / 6 * r20_p0['y'] + 3 * r20_p1['y'] - 3 / 2 * r20_p2['y'] + r20_p3['y'] / 3) / r0_TINY * r0_LITTLE - }; - }; - r0_dbackward = function _r0_t18(r21_p0, r21_p1, r21_p2, r21_p3) { - var r21_p0, r21_p1, r21_p2, r21_p3; - return { - 'x': r21_p0['x'] + (11 / 6 * r21_p0['x'] - 3 * r21_p1['x'] + 3 / 2 * r21_p2['x'] - r21_p3['x'] / 3) / r0_TINY * r0_LITTLE, - 'y': r21_p0['y'] + (11 / 6 * r21_p0['y'] - 3 * r21_p1['y'] + 3 / 2 * r21_p2['y'] - r21_p3['y'] / 3) / r0_TINY * r0_LITTLE - }; - }; - r0_nonlinear = function _r0_t19(r22_a, r22_b, r22_c) { - var r22_a, r22_b, r22_c; - return Math['abs']((r22_c['y'] - r22_a['y']) * (r22_b['x'] - r22_a['x']) - (r22_c['x'] - r22_a['x']) * (r22_b['y'] - r22_a['y'])) > r0_TINY; - }; - r0_Stroke['prototype']['form-stroke'] = function _r0_t20(r23_d1, r23_d2) { - var r23_d1, r23_d2, r23_d1s, r23_d2s, r23_subSegments, r23_p0, r23_j, r23_p1, r23_p2, r23_p3, r23_f1, r23_f2, r23_left, r23_right, r23_seg, r23_curve, r23_sample, r23_t, r23_tn, r23_lthis, r23_rthis, r23_lnext, r23_rnext, r23_lnthis1, r23_rnthis1, r23_lnnext1, r23_rnnext1, r23_lnthis2, r23_rnthis2, r23_lnnext2, r23_rnnext2, r23_lnthis3, r23_rnthis3, r23_lnnext3, r23_rnnext3, r23_dlthis, r23_drthis, r23_dlnext, r23_drnext, r23_il, r23_ir, r23_last, r23_shape, _r23_t0, _r23_t1, _r23_t2, _r23_t3, _r23_t4, _r23_t5, _r23_t6, _r23_t7, _r23_t8, _r23_t9, _r23_t10, _r23_t11, _r23_t12, _r23_t13, _r23_t14, _r23_t15, _r23_t16, _r23_t17, _r23_t18, _r23_t19, _r23_t20, _r23_t21, _r23_t22, _r23_t23, _r23_t24, _r23_t25, _r23_t26, _r23_t27, _r23_t28, _r23_t29, _r23_t30, _r23_t31, _r23_t32, _r23_t33, _r23_t34, _r23_t35, _r23_t36, _r23_t37, _r23_t38; - _r23_t2 = this; - if (_r23_t2['points'][0]['d1'] >= 0) - _r23_t3 = _r23_t2['points'][0]['d1']; - else - _r23_t3 = r23_d1; - _r23_t4 = r23_d1 = _r23_t3; - r23_d1s = [_r23_t4]; - if (_r23_t2['points'][0]['d2'] >= 0) - _r23_t5 = _r23_t2['points'][0]['d2']; - else - _r23_t5 = r23_d2; - _r23_t6 = r23_d2 = _r23_t5; - r23_d2s = [_r23_t6]; - r23_subSegments = []; - r23_p0 = _r23_t2['points'][0]; - r23_j = 1; - for (; r23_j < this['points']['length']; r23_j = r23_j + 1) { - r23_p1 = _r23_t2['points'][r23_j]; - if (r23_p1['onCurve']) { - r23_subSegments['push']([ - r23_p0, - { - 'x': (r23_p0['x'] + r23_p1['x']) / 2, - 'y': (r23_p0['y'] + r23_p1['y']) / 2 - }, - r23_p1 - ]); - _r23_t7 = r23_d1s; - _r23_t8 = _r23_t7['push']; - if (r23_p1['d1'] >= 0) - _r23_t9 = r23_p1['d1']; - else - _r23_t9 = r23_d1; - _r23_t10 = r23_d1 = _r23_t9; - _r23_t8['call'](_r23_t7, _r23_t10); - _r23_t11 = r23_d2s; - _r23_t12 = _r23_t11['push']; - if (r23_p1['d2'] >= 0) - _r23_t13 = r23_p1['d2']; - else - _r23_t13 = r23_d2; - _r23_t14 = r23_d2 = _r23_t13; - _r23_t12['call'](_r23_t11, _r23_t14); - r23_p0 = r23_p1; - } else if (r23_p1['cubic']) { - r23_p2 = _r23_t2['points'][r23_j + 1]; - r23_p3 = _r23_t2['points'][r23_j + 2]; - _r23_t15 = r23_d1s; - _r23_t16 = _r23_t15['push']; - if (r23_p3['d1'] >= 0) - _r23_t17 = r23_p3['d1']; - else - _r23_t17 = r23_d1; - _r23_t18 = r23_d1 = _r23_t17; - _r23_t16['call'](_r23_t15, _r23_t18); - _r23_t19 = r23_d2s; - _r23_t20 = _r23_t19['push']; - if (r23_p3['d2'] >= 0) - _r23_t21 = r23_p3['d2']; - else - _r23_t21 = r23_d2; - _r23_t22 = r23_d2 = _r23_t21; - _r23_t20['call'](_r23_t19, _r23_t22); - r23_subSegments['push']([ - r23_p0, - r23_p1, - r23_p2, - r23_p3 - ]); - r23_p0 = r23_p3; - r23_j = r23_j + 2; - } else if (true) { - r23_p2 = _r23_t2['points'][r23_j + 1]; - _r23_t23 = r23_d1s; - _r23_t24 = _r23_t23['push']; - if (r23_p2['d1'] >= 0) - _r23_t25 = r23_p2['d1']; - else - _r23_t25 = r23_d1; - _r23_t26 = r23_d1 = _r23_t25; - _r23_t24['call'](_r23_t23, _r23_t26); - _r23_t27 = r23_d2s; - _r23_t28 = _r23_t27['push']; - if (r23_p2['d2'] >= 0) - _r23_t29 = r23_p2['d2']; - else - _r23_t29 = r23_d2; - _r23_t30 = r23_d2 = _r23_t29; - _r23_t28['call'](_r23_t27, _r23_t30); - r23_subSegments['push']([ - r23_p0, - r23_p1, - r23_p2 - ]); - r23_p0 = r23_p2; - r23_j = r23_j + 1; - } else - void 0; - } - r23_f1 = r0_Smooth(r23_d1s, { 'method': 'cubic' }); - r23_f2 = r0_Smooth(r23_d2s, { 'method': 'cubic' }); - r23_left = []; - r23_right = []; - r23_j = 0; - for (; r23_j < r23_subSegments['length']; r23_j = r23_j + 1) { - r23_seg = r23_subSegments[r23_j]; - if (r23_seg['length'] > 3) - _r23_t31 = new r0_Bezier(r23_seg[0]['x'], r23_seg[0]['y'], r23_seg[1]['x'], r23_seg[1]['y'], r23_seg[2]['x'], r23_seg[2]['y'], r23_seg[3]['x'], r23_seg[3]['y']); - else - _r23_t31 = new r0_Bezier(r23_seg[0]['x'], r23_seg[0]['y'], r23_seg[1]['x'], r23_seg[1]['y'], r23_seg[2]['x'], r23_seg[2]['y']); - r23_curve = _r23_t31; - _r23_t0 = 0; - _r23_t1 = r0_SAMPLES; - r23_sample = _r23_t0; - for (; r23_sample < _r23_t1; r23_sample = r23_sample + 1) { - r23_t = r23_j + r23_sample / r0_SAMPLES; - r23_tn = r23_j + (r23_sample + 1) / r0_SAMPLES; - r23_lthis = r23_curve['offset'](r23_sample / r0_SAMPLES, r23_f1(r23_t)); - r23_rthis = r23_curve['offset'](r23_sample / r0_SAMPLES, -r23_f2(r23_t)); - r23_lnext = r23_curve['offset']((r23_sample + 1) / r0_SAMPLES, r23_f1(r23_tn)); - r23_rnext = r23_curve['offset']((r23_sample + 1) / r0_SAMPLES, -r23_f2(r23_tn)); - r23_lnthis1 = r23_curve['offset'](r23_sample / r0_SAMPLES + r0_TINY, r23_f1(r23_t + r0_TINY)); - r23_rnthis1 = r23_curve['offset'](r23_sample / r0_SAMPLES + r0_TINY, -r23_f2(r23_t + r0_TINY)); - r23_lnnext1 = r23_curve['offset']((r23_sample + 1) / r0_SAMPLES - r0_TINY, r23_f1(r23_tn - r0_TINY)); - r23_rnnext1 = r23_curve['offset']((r23_sample + 1) / r0_SAMPLES - r0_TINY, -r23_f2(r23_tn - r0_TINY)); - r23_lnthis2 = r23_curve['offset'](r23_sample / r0_SAMPLES + r0_TINY * 2, r23_f1(r23_t + r0_TINY * 2)); - r23_rnthis2 = r23_curve['offset'](r23_sample / r0_SAMPLES + r0_TINY * 2, -r23_f2(r23_t + r0_TINY * 2)); - r23_lnnext2 = r23_curve['offset']((r23_sample + 1) / r0_SAMPLES - r0_TINY * 2, r23_f1(r23_tn - r0_TINY * 2)); - r23_rnnext2 = r23_curve['offset']((r23_sample + 1) / r0_SAMPLES - r0_TINY * 2, -r23_f2(r23_tn - r0_TINY * 2)); - r23_lnthis3 = r23_curve['offset'](r23_sample / r0_SAMPLES + r0_TINY * 3, r23_f1(r23_t + r0_TINY * 3)); - r23_rnthis3 = r23_curve['offset'](r23_sample / r0_SAMPLES + r0_TINY * 3, -r23_f2(r23_t + r0_TINY * 3)); - r23_lnnext3 = r23_curve['offset']((r23_sample + 1) / r0_SAMPLES - r0_TINY * 3, r23_f1(r23_tn - r0_TINY * 3)); - r23_rnnext3 = r23_curve['offset']((r23_sample + 1) / r0_SAMPLES - r0_TINY * 3, -r23_f2(r23_tn - r0_TINY * 3)); - r23_dlthis = r0_dforward(r23_lthis, r23_lnthis1, r23_lnthis2, r23_lnthis3); - r23_drthis = r0_dforward(r23_rthis, r23_rnthis1, r23_rnthis2, r23_rnthis3); - r23_dlnext = r0_dbackward(r23_lnext, r23_lnnext1, r23_lnnext2, r23_lnnext3); - r23_drnext = r0_dbackward(r23_rnext, r23_rnnext2, r23_rnnext2, r23_rnnext3); - r23_il = r0_intersection(r23_lthis['x'], r23_lthis['y'], r23_dlthis['x'], r23_dlthis['y'], r23_lnext['x'], r23_lnext['y'], r23_dlnext['x'], r23_dlnext['y']); - r23_ir = r0_intersection(r23_rthis['x'], r23_rthis['y'], r23_drthis['x'], r23_drthis['y'], r23_rnext['x'], r23_rnext['y'], r23_drnext['x'], r23_drnext['y']); - if (r23_il['x'] !== null && r23_il['y'] !== null && r0_nonlinear(r23_lthis, r23_il, r23_lnext)) { - r23_left['push']({ - 'x': r23_lthis['x'], - 'y': r23_lthis['y'], - 'onCurve': true - }, { - 'x': r23_il['x'], - 'y': r23_il['y'], - 'onCurve': false - }); - } else { - r23_left['push']({ - 'x': r23_lthis['x'], - 'y': r23_lthis['y'], - 'onCurve': true - }); - } - if (r23_ir['x'] !== null && r23_ir['y'] !== null && r0_nonlinear(r23_rthis, r23_ir, r23_rnext)) { - r23_right['push']({ - 'x': r23_rthis['x'], - 'y': r23_rthis['y'], - 'onCurve': true - }, { - 'x': r23_ir['x'], - 'y': r23_ir['y'], - 'onCurve': false - }); - } else { - r23_right['push']({ - 'x': r23_rthis['x'], - 'y': r23_rthis['y'], - 'onCurve': true - }); - } - } - } - _r23_t32 = r23_left; - _r23_t33 = _r23_t32['push']; - r23_last = r23_curve['offset'](1, r23_f1(r23_t)); - _r23_t34 = { - 'x': r23_last['x'], - 'y': r23_last['y'], - 'onCurve': true - }; - _r23_t33['call'](_r23_t32, _r23_t34); - _r23_t35 = r23_right; - _r23_t36 = _r23_t35['push']; - r23_last = r23_curve['offset'](1, -r23_f2(r23_t)); - _r23_t37 = { - 'x': r23_last['x'], - 'y': r23_last['y'], - 'onCurve': true - }; - _r23_t36['call'](_r23_t35, _r23_t37); - r23_shape = r23_left['concat'](r23_right['reverse']())['map'](function _r23_t38(r25_p) { - var r25_p; - return { - 'x': r25_p['x'], - 'y': r25_p['y'], - 'onCurve': r25_p['onCurve'] - }; - }); - return [r23_shape]; - }; - r0_Ring = function _r0_t21(r26_u, r26_d, r26_l, r26_r) { - var r26_u, r26_d, r26_l, r26_r, r26_my, r26_mx, r26_s; - r26_my = (r26_u + r26_d) / 2; - r26_mx = (r26_l + r26_r) / 2; - r26_s = new r0_Stroke()['start-from'](r26_mx, r26_d)['cubic-to'](r26_mx + (r26_l - r26_mx) * r0_BKAPPA, r26_d, r26_l, r26_my + (r26_d - r26_my) * r0_BKAPPA, r26_l, r26_my)['cubic-to'](r26_l, r26_my + (r26_u - r26_my) * r0_BKAPPA, r26_mx + (r26_l - r26_mx) * r0_BKAPPA, r26_u, r26_mx, r26_u)['cubic-to'](r26_mx + (r26_r - r26_mx) * r0_BKAPPA, r26_u, r26_r, r26_my + (r26_u - r26_my) * r0_BKAPPA, r26_r, r26_my)['cubic-to'](r26_r, r26_my + (r26_d - r26_my) * r0_BKAPPA, r26_mx + (r26_r - r26_mx) * r0_BKAPPA, r26_d, r26_mx, r26_d); - return r26_s['points']; - }; - r0_ORing = function _r0_t22(r27_u, r27_d, r27_l, r27_r, r27_smooth) { - var r27_u, r27_d, r27_l, r27_r, r27_smooth, r27_myu, r27_myd, r27_mx, r27_s; - r27_myu = r27_u - r27_smooth; - r27_myd = r27_d + r27_smooth; - r27_mx = (r27_l + r27_r) / 2; - r27_s = new r0_Stroke()['start-from'](r27_mx, r27_d)['cubic-to'](r27_mx + (r27_l - r27_mx) * r0_BKAPPA, r27_d, r27_l, r27_myd + (r27_d - r27_myd) * r0_BKAPPA, r27_l, r27_myd)['line-to'](r27_l, r27_myu)['cubic-to'](r27_l, r27_myu + (r27_u - r27_myu) * r0_BKAPPA, r27_mx + (r27_l - r27_mx) * r0_BKAPPA, r27_u, r27_mx, r27_u)['cubic-to'](r27_mx + (r27_r - r27_mx) * r0_BKAPPA, r27_u, r27_r, r27_myu + (r27_u - r27_myu) * r0_BKAPPA, r27_r, r27_myu)['line-to'](r27_r, r27_myd)['cubic-to'](r27_r, r27_myd + (r27_d - r27_myd) * r0_BKAPPA, r27_mx + (r27_r - r27_mx) * r0_BKAPPA, r27_d, r27_mx, r27_d); - return r27_s['points']; - }; - r0_xn$createglyph$7Hrq = function _r0_t23(r32_name, r32_actions) { - var r32_name, r32_actions, r32_glyphObject; - r32_glyphObject = new r0_Glyph(r32_name); - r0_glyphList['push'](r32_glyphObject); - r0_glyphs[r32_name] = r32_glyphObject; - r32_actions['call'](r32_glyphObject); - return r32_glyphObject; - }; - r0_xn$createglyph$7Hrq('space', function _r0_t24() { - var r34_xn$setwidth$9Jrj, r34_xn$assignunicode$7Hrq, r34_xn$startfrom$1aao, r34_xn$lineto$5sIl, r34_xn$curveto$1aao, r34_xn$cubicto$1aao, r34_xn$putshapes$9Jrj, r34_xn$reverselast$3qIs, _r34_t0; - _r34_t0 = this; - r34_xn$setwidth$9Jrj = _r34_t0['set-width']['bind'](_r34_t0); - r34_xn$assignunicode$7Hrq = _r34_t0['assign-unicode']['bind'](_r34_t0); - r34_xn$startfrom$1aao = _r34_t0['start-from']['bind'](_r34_t0); - r34_xn$lineto$5sIl = _r34_t0['line-to']['bind'](_r34_t0); - r34_xn$curveto$1aao = _r34_t0['curve-to']['bind'](_r34_t0); - r34_xn$cubicto$1aao = _r34_t0['cubic-to']['bind'](_r34_t0); - r34_xn$putshapes$9Jrj = _r34_t0['put-shapes']['bind'](_r34_t0); - r34_xn$reverselast$3qIs = _r34_t0['reverse-last']['bind'](_r34_t0); - r34_xn$setwidth$9Jrj(r0_WIDTH); - r34_xn$assignunicode$7Hrq(' '); - return void 0; - }); - r0_xn$createglyph$7Hrq('bar', function _r0_t25() { - var r36_xn$setwidth$9Jrj, r36_xn$assignunicode$7Hrq, r36_xn$startfrom$1aao, r36_xn$lineto$5sIl, r36_xn$curveto$1aao, r36_xn$cubicto$1aao, r36_xn$putshapes$9Jrj, r36_xn$reverselast$3qIs, _r36_t0; - _r36_t0 = this; - r36_xn$setwidth$9Jrj = _r36_t0['set-width']['bind'](_r36_t0); - r36_xn$assignunicode$7Hrq = _r36_t0['assign-unicode']['bind'](_r36_t0); - r36_xn$startfrom$1aao = _r36_t0['start-from']['bind'](_r36_t0); - r36_xn$lineto$5sIl = _r36_t0['line-to']['bind'](_r36_t0); - r36_xn$curveto$1aao = _r36_t0['curve-to']['bind'](_r36_t0); - r36_xn$cubicto$1aao = _r36_t0['cubic-to']['bind'](_r36_t0); - r36_xn$putshapes$9Jrj = _r36_t0['put-shapes']['bind'](_r36_t0); - r36_xn$reverselast$3qIs = _r36_t0['reverse-last']['bind'](_r36_t0); - r36_xn$setwidth$9Jrj(r0_WIDTH); - r36_xn$assignunicode$7Hrq('|'); - r36_xn$putshapes$9Jrj(new r0_Stroke()['start-from'](r0_MIDDLE, r0_DESCENDER / 2)['set-width'](r0_STROKE / 2, r0_STROKE / 2)['line-to'](r0_MIDDLE, r0_CAP - r0_DESCENDER / 2)['form-stroke']()); - return void 0; - }); - r0_xn$createglyph$7Hrq('A', function _r0_t26() { - var r38_xn$setwidth$9Jrj, r38_xn$assignunicode$7Hrq, r38_xn$startfrom$1aao, r38_xn$lineto$5sIl, r38_xn$curveto$1aao, r38_xn$cubicto$1aao, r38_xn$putshapes$9Jrj, r38_xn$reverselast$3qIs, r38_TURN, r38_leftbar, r38_rightbar, r38_hbar, _r38_t0; - _r38_t0 = this; - r38_xn$setwidth$9Jrj = _r38_t0['set-width']['bind'](_r38_t0); - r38_xn$assignunicode$7Hrq = _r38_t0['assign-unicode']['bind'](_r38_t0); - r38_xn$startfrom$1aao = _r38_t0['start-from']['bind'](_r38_t0); - r38_xn$lineto$5sIl = _r38_t0['line-to']['bind'](_r38_t0); - r38_xn$curveto$1aao = _r38_t0['curve-to']['bind'](_r38_t0); - r38_xn$cubicto$1aao = _r38_t0['cubic-to']['bind'](_r38_t0); - r38_xn$putshapes$9Jrj = _r38_t0['put-shapes']['bind'](_r38_t0); - r38_xn$reverselast$3qIs = _r38_t0['reverse-last']['bind'](_r38_t0); - r38_xn$setwidth$9Jrj(r0_WIDTH); - r38_xn$assignunicode$7Hrq('A'); - r38_TURN = r0_XH * 0.1; - r38_leftbar = new r0_Stroke(); - r38_leftbar['start-from'](r0_SB, 0)['line-to'](r0_SB, r38_TURN)['curve-to'](r0_SB, r38_TURN + 0.27 * (r0_CAP - r38_TURN), r0_MIDDLE - r0_STROKE / 2, r0_CAP); - r38_rightbar = new r0_Stroke(); - r38_rightbar['start-from'](r0_RIGHTSB, 0)['line-to'](r0_RIGHTSB, r38_TURN)['curve-to'](r0_RIGHTSB, r38_TURN + 0.27 * (r0_CAP - r38_TURN), r0_MIDDLE + r0_STROKE / 2, r0_CAP); - r38_hbar = new r0_Stroke(); - r38_hbar['start-from'](r0_SB + r0_STROKE, r0_XH / 2)['line-to'](r0_RIGHTSB - r0_STROKE, r0_XH / 2); - r38_xn$putshapes$9Jrj(r38_leftbar['form-stroke'](0, r0_STROKE)); - r38_xn$putshapes$9Jrj(r38_hbar['form-stroke'](0, r0_STROKE)); - r38_xn$putshapes$9Jrj(r38_rightbar['form-stroke'](r0_STROKE, 0)); - r38_xn$startfrom$1aao(r0_MIDDLE - r0_STROKE / 2, r0_CAP); - r38_xn$lineto$5sIl(r0_MIDDLE + r0_STROKE / 2, r0_CAP); - r38_xn$lineto$5sIl(r0_MIDDLE, r0_CAP - r0_STROKE); - return void 0; - }); - r0_xn$createglyph$7Hrq('X', function _r0_t27() { - var r40_xn$setwidth$9Jrj, r40_xn$assignunicode$7Hrq, r40_xn$startfrom$1aao, r40_xn$lineto$5sIl, r40_xn$curveto$1aao, r40_xn$cubicto$1aao, r40_xn$putshapes$9Jrj, r40_xn$reverselast$3qIs, r40_TURN, r40_straight, r40_strench, r40_barone, r40_bartwo, _r40_t0, _r40_t1; - _r40_t0 = this; - r40_xn$setwidth$9Jrj = _r40_t0['set-width']['bind'](_r40_t0); - r40_xn$assignunicode$7Hrq = _r40_t0['assign-unicode']['bind'](_r40_t0); - r40_xn$startfrom$1aao = _r40_t0['start-from']['bind'](_r40_t0); - r40_xn$lineto$5sIl = _r40_t0['line-to']['bind'](_r40_t0); - r40_xn$curveto$1aao = _r40_t0['curve-to']['bind'](_r40_t0); - r40_xn$cubicto$1aao = _r40_t0['cubic-to']['bind'](_r40_t0); - r40_xn$putshapes$9Jrj = _r40_t0['put-shapes']['bind'](_r40_t0); - r40_xn$reverselast$3qIs = _r40_t0['reverse-last']['bind'](_r40_t0); - r40_xn$setwidth$9Jrj(r0_WIDTH); - r40_xn$assignunicode$7Hrq('X'); - r40_TURN = r0_XH * 0.05; - r40_straight = 0.6; - r40_strench = 0.125; - r40_barone = new r0_Stroke()['start-from'](r0_SB + r0_HALFSTROKE, 0)['set-width'](r0_HALFSTROKE, r0_HALFSTROKE)['line-to'](r0_SB + r0_HALFSTROKE, r40_TURN)['curve-to'](r0_SB + r0_HALFSTROKE, r40_TURN + r40_strench * (r0_CAP - r40_TURN), r0_MIDDLE + r40_straight * (r0_SB + r0_HALFSTROKE - r0_MIDDLE), r0_CAPMIDDLE + r40_straight * (r40_TURN + r40_strench * (r0_CAP - r40_TURN) - r0_CAPMIDDLE))['line-to'](r0_MIDDLE + r40_straight * (r0_RIGHTSB - r0_HALFSTROKE - r0_MIDDLE), r0_CAPMIDDLE + r40_straight * (r0_CAP - r40_TURN - r40_strench * (r0_CAP - r40_TURN) - r0_CAPMIDDLE))['curve-to'](r0_RIGHTSB - r0_HALFSTROKE, r0_CAP - r40_TURN - r40_strench * (r0_CAP - r40_TURN), r0_RIGHTSB - r0_HALFSTROKE, r0_CAP - r40_TURN)['line-to'](r0_RIGHTSB - r0_HALFSTROKE, r0_CAP)['form-stroke'](); - r40_bartwo = [r40_barone[0]['map'](function _r40_t1(r41_pt) { - var r41_pt; + r15_xn$setwidth$9Jrj = _r15_t0['set-width']['bind'](_r15_t0); + r15_xn$assignunicode$7Hrq = _r15_t0['assign-unicode']['bind'](_r15_t0); + r15_xn$startfrom$1aao = _r15_t0['start-from']['bind'](_r15_t0); + r15_xn$lineto$5sIl = _r15_t0['line-to']['bind'](_r15_t0); + r15_xn$curveto$1aao = _r15_t0['curve-to']['bind'](_r15_t0); + r15_xn$cubicto$1aao = _r15_t0['cubic-to']['bind'](_r15_t0); + r15_xn$putshapes$9Jrj = _r15_t0['put-shapes']['bind'](_r15_t0); + r15_xn$reverselast$3qIs = _r15_t0['reverse-last']['bind'](_r15_t0); + r15_xn$includeglyph$3qIs = _r15_t0['include-glyph']['bind'](_r15_t0); + r15_xn$setwidth$9Jrj(r0_WIDTH); + r15_xn$assignunicode$7Hrq('X'); + r15_TURN = r0_XH * 0.05; + r15_straight = 0.6; + r15_strench = 0.125; + r15_barone = new r0_Stroke()['start-from'](r0_SB + r0_HALFSTROKE, 0)['set-width'](r0_HALFSTROKE, r0_HALFSTROKE)['line-to'](r0_SB + r0_HALFSTROKE, r15_TURN)['curve-to'](r0_SB + r0_HALFSTROKE, r15_TURN + r15_strench * (r0_CAP - r15_TURN), r0_MIDDLE + r15_straight * (r0_SB + r0_HALFSTROKE - r0_MIDDLE), r0_CAPMIDDLE + r15_straight * (r15_TURN + r15_strench * (r0_CAP - r15_TURN) - r0_CAPMIDDLE))['line-to'](r0_MIDDLE + r15_straight * (r0_RIGHTSB - r0_HALFSTROKE - r0_MIDDLE), r0_CAPMIDDLE + r15_straight * (r0_CAP - r15_TURN - r15_strench * (r0_CAP - r15_TURN) - r0_CAPMIDDLE))['curve-to'](r0_RIGHTSB - r0_HALFSTROKE, r0_CAP - r15_TURN - r15_strench * (r0_CAP - r15_TURN), r0_RIGHTSB - r0_HALFSTROKE, r0_CAP - r15_TURN)['line-to'](r0_RIGHTSB - r0_HALFSTROKE, r0_CAP)['form-stroke'](); + r15_bartwo = [r15_barone[0]['map'](function _r15_t1(r16_pt) { + var r16_pt; return { - 'x': r0_WIDTH - r41_pt['x'], - 'y': r41_pt['y'], - 'onCurve': r41_pt['onCurve'], - 'cubic': r41_pt['cubic'] + 'x': r0_WIDTH - r16_pt['x'], + 'y': r16_pt['y'], + 'onCurve': r16_pt['onCurve'], + 'cubic': r16_pt['cubic'] }; })['reverse']()]; - r40_xn$putshapes$9Jrj(r40_barone); - r40_xn$putshapes$9Jrj(r40_bartwo); + r15_xn$putshapes$9Jrj(r15_barone); + r15_xn$putshapes$9Jrj(r15_bartwo); return void 0; }); - r0_xn$createglyph$7Hrq('Y', function _r0_t28() { - var r43_xn$setwidth$9Jrj, r43_xn$assignunicode$7Hrq, r43_xn$startfrom$1aao, r43_xn$lineto$5sIl, r43_xn$curveto$1aao, r43_xn$cubicto$1aao, r43_xn$putshapes$9Jrj, r43_xn$reverselast$3qIs, r43_TURN, r43_straight, r43_strench, r43_cross, r43_barone, r43_bartwo, _r43_t0, _r43_t1; + r0_xn$createglyph$7Hrq('Y', function _r0_t7() { + var r18_xn$setwidth$9Jrj, r18_xn$assignunicode$7Hrq, r18_xn$startfrom$1aao, r18_xn$lineto$5sIl, r18_xn$curveto$1aao, r18_xn$cubicto$1aao, r18_xn$putshapes$9Jrj, r18_xn$reverselast$3qIs, r18_xn$includeglyph$3qIs, r18_TURN, r18_straight, r18_strench, r18_cross, r18_barone, r18_bartwo, _r18_t0, _r18_t1; + _r18_t0 = this; + r18_xn$setwidth$9Jrj = _r18_t0['set-width']['bind'](_r18_t0); + r18_xn$assignunicode$7Hrq = _r18_t0['assign-unicode']['bind'](_r18_t0); + r18_xn$startfrom$1aao = _r18_t0['start-from']['bind'](_r18_t0); + r18_xn$lineto$5sIl = _r18_t0['line-to']['bind'](_r18_t0); + r18_xn$curveto$1aao = _r18_t0['curve-to']['bind'](_r18_t0); + r18_xn$cubicto$1aao = _r18_t0['cubic-to']['bind'](_r18_t0); + r18_xn$putshapes$9Jrj = _r18_t0['put-shapes']['bind'](_r18_t0); + r18_xn$reverselast$3qIs = _r18_t0['reverse-last']['bind'](_r18_t0); + r18_xn$includeglyph$3qIs = _r18_t0['include-glyph']['bind'](_r18_t0); + r18_xn$setwidth$9Jrj(r0_WIDTH); + r18_xn$assignunicode$7Hrq('Y'); + r18_TURN = r0_XH * 0.05; + r18_straight = 0.6; + r18_strench = 0.15; + r18_cross = r0_CAP * 0.4; + r18_barone = new r0_Stroke()['start-from'](r0_MIDDLE, r18_cross)['set-width'](r0_HALFSTROKE, r0_HALFSTROKE)['line-to'](r0_MIDDLE + r18_straight * (r0_RIGHTSB - r0_HALFSTROKE - r0_MIDDLE), r18_cross + r18_straight * (r0_CAP - r18_TURN - r18_strench * (r0_CAP - r18_TURN) - r18_cross))['curve-to'](r0_RIGHTSB - r0_HALFSTROKE, r0_CAP - r18_TURN - r18_strench * (r0_CAP - r18_TURN), r0_RIGHTSB - r0_HALFSTROKE, r0_CAP - r18_TURN)['line-to'](r0_RIGHTSB - r0_HALFSTROKE, r0_CAP)['form-stroke'](); + r18_bartwo = [r18_barone[0]['map'](function _r18_t1(r19_pt) { + var r19_pt; + return { + 'x': r0_WIDTH - r19_pt['x'], + 'y': r19_pt['y'], + 'onCurve': r19_pt['onCurve'], + 'cubic': r19_pt['cubic'] + }; + })['reverse']()]; + r18_xn$putshapes$9Jrj(r18_barone); + r18_xn$putshapes$9Jrj(r18_bartwo); + r18_xn$putshapes$9Jrj(new r0_Stroke()['start-from'](r0_MIDDLE, 0)['set-width'](r0_HALFSTROKE, r0_HALFSTROKE)['line-to'](r0_MIDDLE, r18_cross + r0_HALFSTROKE)['form-stroke']()); + return void 0; + }); + r0_xn$createglyph$7Hrq('B', function _r0_t8() { + var r21_xn$setwidth$9Jrj, r21_xn$assignunicode$7Hrq, r21_xn$startfrom$1aao, r21_xn$lineto$5sIl, r21_xn$curveto$1aao, r21_xn$cubicto$1aao, r21_xn$putshapes$9Jrj, r21_xn$reverselast$3qIs, r21_xn$includeglyph$3qIs, r21_bowl, r21_tkappa, r21_bkappa, r21_turntop, r21_turnbottom, r21_topbowl, r21_bottombowl, r21_leftbar, _r21_t0; + _r21_t0 = this; + r21_xn$setwidth$9Jrj = _r21_t0['set-width']['bind'](_r21_t0); + r21_xn$assignunicode$7Hrq = _r21_t0['assign-unicode']['bind'](_r21_t0); + r21_xn$startfrom$1aao = _r21_t0['start-from']['bind'](_r21_t0); + r21_xn$lineto$5sIl = _r21_t0['line-to']['bind'](_r21_t0); + r21_xn$curveto$1aao = _r21_t0['curve-to']['bind'](_r21_t0); + r21_xn$cubicto$1aao = _r21_t0['cubic-to']['bind'](_r21_t0); + r21_xn$putshapes$9Jrj = _r21_t0['put-shapes']['bind'](_r21_t0); + r21_xn$reverselast$3qIs = _r21_t0['reverse-last']['bind'](_r21_t0); + r21_xn$includeglyph$3qIs = _r21_t0['include-glyph']['bind'](_r21_t0); + r21_xn$setwidth$9Jrj(r0_WIDTH); + r21_xn$assignunicode$7Hrq('B'); + r21_bowl = 451; + r21_tkappa = r0_COKAPPA - 0.22; + r21_bkappa = r0_COKAPPA - 0.2; + r21_turntop = (r0_CAP + (r21_bowl - r0_STROKE)) / 2; + r21_turnbottom = r21_bowl / 2; + r21_topbowl = new r0_Stroke(); + r21_topbowl['start-from'](r0_SB, r0_CAP)['line-to'](r0_RIGHTSB - r0_SB * 0.5 - r21_turnbottom, r0_CAP)['cubic-to'](r0_RIGHTSB - r0_SB * 0.5 - r21_tkappa * r21_turnbottom, r0_CAP, r0_RIGHTSB - r0_SB * 0.5, r21_turntop + (r0_CAP - r21_turntop) * r0_KAPPA, r0_RIGHTSB - r0_SB * 0.5, r21_turntop)['cubic-to'](r0_RIGHTSB - r0_SB * 0.5, r21_turntop + r0_KAPPA * (r21_bowl - r0_STROKE - r21_turntop), r0_RIGHTSB - r0_SB * 0.5 - r21_tkappa * r21_turnbottom, r21_bowl - r0_STROKE, r0_RIGHTSB - r0_SB * 0.5 - r21_turnbottom, r21_bowl - r0_STROKE)['line-to'](r0_SB, r21_bowl - r0_STROKE); + r21_bottombowl = new r0_Stroke(); + r21_bottombowl['start-from'](r0_SB, 0)['line-to'](r0_RIGHTSB - r21_turnbottom, 0)['cubic-to'](r0_RIGHTSB - r21_bkappa * r21_turnbottom, 0, r0_RIGHTSB, r21_turnbottom * r0_KAPPA, r0_RIGHTSB, r21_turnbottom)['cubic-to'](r0_RIGHTSB, r21_turnbottom + r0_KAPPA * (r21_bowl - r21_turnbottom), r0_RIGHTSB - r21_bkappa * r21_turnbottom, r21_bowl, r0_RIGHTSB - r21_turnbottom, r21_bowl)['line-to'](r0_SB, r21_bowl); + r21_leftbar = new r0_Stroke()['start-from'](r0_SB, 0)['line-to'](r0_SB, r0_CAP); + r21_xn$putshapes$9Jrj(r21_topbowl['form-stroke'](0, r0_STROKE)); + r21_xn$putshapes$9Jrj(r21_bottombowl['form-stroke'](r0_STROKE, 0)); + r21_xn$putshapes$9Jrj(r21_leftbar['form-stroke'](0, r0_STROKE)); + return void 0; + }); + r0_xn$createglyph$7Hrq('D', function _r0_t9() { + var r23_xn$setwidth$9Jrj, r23_xn$assignunicode$7Hrq, r23_xn$startfrom$1aao, r23_xn$lineto$5sIl, r23_xn$curveto$1aao, r23_xn$cubicto$1aao, r23_xn$putshapes$9Jrj, r23_xn$reverselast$3qIs, r23_xn$includeglyph$3qIs, r23_dsmooth, r23_bsmooth, r23_bkappa, r23_leftbar, r23_bowl, _r23_t0; + _r23_t0 = this; + r23_xn$setwidth$9Jrj = _r23_t0['set-width']['bind'](_r23_t0); + r23_xn$assignunicode$7Hrq = _r23_t0['assign-unicode']['bind'](_r23_t0); + r23_xn$startfrom$1aao = _r23_t0['start-from']['bind'](_r23_t0); + r23_xn$lineto$5sIl = _r23_t0['line-to']['bind'](_r23_t0); + r23_xn$curveto$1aao = _r23_t0['curve-to']['bind'](_r23_t0); + r23_xn$cubicto$1aao = _r23_t0['cubic-to']['bind'](_r23_t0); + r23_xn$putshapes$9Jrj = _r23_t0['put-shapes']['bind'](_r23_t0); + r23_xn$reverselast$3qIs = _r23_t0['reverse-last']['bind'](_r23_t0); + r23_xn$includeglyph$3qIs = _r23_t0['include-glyph']['bind'](_r23_t0); + r23_xn$setwidth$9Jrj(r0_WIDTH); + r23_xn$assignunicode$7Hrq('D'); + r23_dsmooth = r0_SMOOTH * 1.55; + r23_bsmooth = r0_SMOOTH * 1.3; + r23_bkappa = r0_COKAPPA - 0.2; + r23_leftbar = new r0_Stroke()['start-from'](r0_SB, 0)['line-to'](r0_SB, r0_CAP); + r23_bowl = new r0_Stroke(); + r23_bowl['start-from'](r0_SB, 0)['line-to'](r0_RIGHTSB - r23_bsmooth, 0)['cubic-to'](r0_RIGHTSB - r23_bkappa * r23_bsmooth, 0, r0_RIGHTSB, r0_COBKAPPA * r23_dsmooth, r0_RIGHTSB, r23_dsmooth)['line-to'](r0_RIGHTSB, r0_CAP - r23_dsmooth)['cubic-to'](r0_RIGHTSB, r0_CAP - r0_COBKAPPA * r23_dsmooth, r0_RIGHTSB - r23_bkappa * r23_bsmooth, r0_CAP, r0_RIGHTSB - r23_bsmooth, r0_CAP)['line-to'](r0_SB, r0_CAP); + r23_xn$putshapes$9Jrj(r23_bowl['form-stroke'](r0_STROKE, 0)); + r23_xn$putshapes$9Jrj(r23_leftbar['form-stroke'](0, r0_STROKE)); + return void 0; + }); + r0_xn$createglyph$7Hrq('P', function _r0_t10() { + var r25_xn$setwidth$9Jrj, r25_xn$assignunicode$7Hrq, r25_xn$startfrom$1aao, r25_xn$lineto$5sIl, r25_xn$curveto$1aao, r25_xn$cubicto$1aao, r25_xn$putshapes$9Jrj, r25_xn$reverselast$3qIs, r25_xn$includeglyph$3qIs, r25_bowl, r25_bkappa, r25_turntop, r25_turnbottom, r25_topbowl, r25_leftbar, _r25_t0; + _r25_t0 = this; + r25_xn$setwidth$9Jrj = _r25_t0['set-width']['bind'](_r25_t0); + r25_xn$assignunicode$7Hrq = _r25_t0['assign-unicode']['bind'](_r25_t0); + r25_xn$startfrom$1aao = _r25_t0['start-from']['bind'](_r25_t0); + r25_xn$lineto$5sIl = _r25_t0['line-to']['bind'](_r25_t0); + r25_xn$curveto$1aao = _r25_t0['curve-to']['bind'](_r25_t0); + r25_xn$cubicto$1aao = _r25_t0['cubic-to']['bind'](_r25_t0); + r25_xn$putshapes$9Jrj = _r25_t0['put-shapes']['bind'](_r25_t0); + r25_xn$reverselast$3qIs = _r25_t0['reverse-last']['bind'](_r25_t0); + r25_xn$includeglyph$3qIs = _r25_t0['include-glyph']['bind'](_r25_t0); + r25_xn$setwidth$9Jrj(r0_WIDTH); + r25_xn$assignunicode$7Hrq('P'); + r25_bowl = r0_CAPMIDDLE; + r25_bkappa = r0_COKAPPA - 0.2; + r25_turntop = (r0_CAP + (r25_bowl - r0_HALFSTROKE)) / 2; + r25_turnbottom = r25_bowl / 2; + r25_topbowl = new r0_Stroke(); + r25_topbowl['start-from'](r0_SB, r0_CAP)['line-to'](r0_RIGHTSB - r25_turnbottom, r0_CAP)['cubic-to'](r0_RIGHTSB - r25_bkappa * r25_turnbottom, r0_CAP, r0_RIGHTSB, r25_turntop + (r0_CAP - r25_turntop) * r0_KAPPA, r0_RIGHTSB, r25_turntop)['cubic-to'](r0_RIGHTSB, r25_turntop + r0_KAPPA * (r25_bowl - r0_HALFSTROKE - r25_turntop), r0_RIGHTSB - r25_bkappa * r25_turnbottom, r25_bowl - r0_HALFSTROKE, r0_RIGHTSB - r25_turnbottom, r25_bowl - r0_HALFSTROKE)['line-to'](r0_SB, r25_bowl - r0_HALFSTROKE); + r25_leftbar = new r0_Stroke()['start-from'](r0_SB, 0)['line-to'](r0_SB, r0_CAP); + r25_xn$putshapes$9Jrj(r25_topbowl['form-stroke'](0, r0_STROKE)); + r25_xn$putshapes$9Jrj(r25_leftbar['form-stroke'](0, r0_STROKE)); + return void 0; + }); + r0_xn$createglyph$7Hrq('R', function _r0_t11() { + var r27_xn$setwidth$9Jrj, r27_xn$assignunicode$7Hrq, r27_xn$startfrom$1aao, r27_xn$lineto$5sIl, r27_xn$curveto$1aao, r27_xn$cubicto$1aao, r27_xn$putshapes$9Jrj, r27_xn$reverselast$3qIs, r27_xn$includeglyph$3qIs, r27_TURN, r27_right, _r27_t0; + _r27_t0 = this; + r27_xn$setwidth$9Jrj = _r27_t0['set-width']['bind'](_r27_t0); + r27_xn$assignunicode$7Hrq = _r27_t0['assign-unicode']['bind'](_r27_t0); + r27_xn$startfrom$1aao = _r27_t0['start-from']['bind'](_r27_t0); + r27_xn$lineto$5sIl = _r27_t0['line-to']['bind'](_r27_t0); + r27_xn$curveto$1aao = _r27_t0['curve-to']['bind'](_r27_t0); + r27_xn$cubicto$1aao = _r27_t0['cubic-to']['bind'](_r27_t0); + r27_xn$putshapes$9Jrj = _r27_t0['put-shapes']['bind'](_r27_t0); + r27_xn$reverselast$3qIs = _r27_t0['reverse-last']['bind'](_r27_t0); + r27_xn$includeglyph$3qIs = _r27_t0['include-glyph']['bind'](_r27_t0); + r27_xn$setwidth$9Jrj(r0_WIDTH); + r27_xn$assignunicode$7Hrq('R'); + r27_xn$includeglyph$3qIs(r0_glyphs['P']); + r27_TURN = r0_XH * 0.1; + r27_right = r0_RIGHTSB + r0_O; + r27_xn$putshapes$9Jrj(new r0_Stroke()['start-from'](r27_right - r0_HALFSTROKE, 0)['set-width'](r0_HALFSTROKE, r0_HALFSTROKE)['curve-to'](r27_right - r0_HALFSTROKE, r27_TURN + 0.1 * (r0_XH - r27_TURN), r0_MIDDLE, r0_CAPMIDDLE)['form-stroke']()); + return void 0; + }); + r0_xn$createglyph$7Hrq('C', function _r0_t12() { + var r29_xn$setwidth$9Jrj, r29_xn$assignunicode$7Hrq, r29_xn$startfrom$1aao, r29_xn$lineto$5sIl, r29_xn$curveto$1aao, r29_xn$cubicto$1aao, r29_xn$putshapes$9Jrj, r29_xn$reverselast$3qIs, r29_xn$includeglyph$3qIs, r29_outline, _r29_t0; + _r29_t0 = this; + r29_xn$setwidth$9Jrj = _r29_t0['set-width']['bind'](_r29_t0); + r29_xn$assignunicode$7Hrq = _r29_t0['assign-unicode']['bind'](_r29_t0); + r29_xn$startfrom$1aao = _r29_t0['start-from']['bind'](_r29_t0); + r29_xn$lineto$5sIl = _r29_t0['line-to']['bind'](_r29_t0); + r29_xn$curveto$1aao = _r29_t0['curve-to']['bind'](_r29_t0); + r29_xn$cubicto$1aao = _r29_t0['cubic-to']['bind'](_r29_t0); + r29_xn$putshapes$9Jrj = _r29_t0['put-shapes']['bind'](_r29_t0); + r29_xn$reverselast$3qIs = _r29_t0['reverse-last']['bind'](_r29_t0); + r29_xn$includeglyph$3qIs = _r29_t0['include-glyph']['bind'](_r29_t0); + r29_xn$setwidth$9Jrj(r0_WIDTH); + r29_xn$assignunicode$7Hrq('C'); + r29_outline = new r0_Stroke(); + r29_outline['start-from'](r0_RIGHTSB - r0_SB * 0.1, r0_CAP - r0_HOOK)['curve-to'](r0_MIDDLE + r0_KAPPA_HOOK * (r0_MIDDLE - r0_para['sb']), r0_CAPO, r0_MIDDLE, r0_CAPO)['cubic-to'](r0_SB + (1 - r0_BKAPPA) * (r0_WIDTH / 2 - r0_SB), r0_CAPO, r0_SB, r0_CAP - r0_COBKAPPA * r0_SMOOTH, r0_SB, r0_CAP_SMOOTH)['line-to'](r0_SB, r0_SMOOTH)['cubic-to'](r0_SB, r0_COBKAPPA * r0_SMOOTH, r0_SB + (1 - r0_BKAPPA) * (r0_WIDTH / 2 - r0_SB), r0_O, r0_WIDTH / 2, r0_O)['curve-to'](r0_MIDDLE + r0_KAPPA_HOOK * (r0_MIDDLE - r0_SB), r0_O, r0_RIGHTSB - r0_SB * 0.1, r0_HOOK); + r29_xn$putshapes$9Jrj(r29_outline['form-stroke'](r0_STROKE, 0)); + return void 0; + }); + r0_xn$createglyph$7Hrq('G', function _r0_t13() { + var r31_xn$setwidth$9Jrj, r31_xn$assignunicode$7Hrq, r31_xn$startfrom$1aao, r31_xn$lineto$5sIl, r31_xn$curveto$1aao, r31_xn$cubicto$1aao, r31_xn$putshapes$9Jrj, r31_xn$reverselast$3qIs, r31_xn$includeglyph$3qIs, r31_outline, r31_bar, _r31_t0; + _r31_t0 = this; + r31_xn$setwidth$9Jrj = _r31_t0['set-width']['bind'](_r31_t0); + r31_xn$assignunicode$7Hrq = _r31_t0['assign-unicode']['bind'](_r31_t0); + r31_xn$startfrom$1aao = _r31_t0['start-from']['bind'](_r31_t0); + r31_xn$lineto$5sIl = _r31_t0['line-to']['bind'](_r31_t0); + r31_xn$curveto$1aao = _r31_t0['curve-to']['bind'](_r31_t0); + r31_xn$cubicto$1aao = _r31_t0['cubic-to']['bind'](_r31_t0); + r31_xn$putshapes$9Jrj = _r31_t0['put-shapes']['bind'](_r31_t0); + r31_xn$reverselast$3qIs = _r31_t0['reverse-last']['bind'](_r31_t0); + r31_xn$includeglyph$3qIs = _r31_t0['include-glyph']['bind'](_r31_t0); + r31_xn$setwidth$9Jrj(r0_WIDTH); + r31_xn$assignunicode$7Hrq('G'); + r31_outline = new r0_Stroke(); + r31_outline['start-from'](r0_RIGHTSB - r0_SB * 0.1, r0_CAP - r0_HOOK)['curve-to'](r0_MIDDLE + r0_KAPPA_HOOK * (r0_MIDDLE - r0_para['sb']), r0_CAPO, r0_MIDDLE, r0_CAPO)['cubic-to'](r0_SB + (1 - r0_BKAPPA) * (r0_WIDTH / 2 - r0_SB), r0_CAPO, r0_SB, r0_CAP - r0_COBKAPPA * r0_SMOOTH, r0_SB, r0_CAP_SMOOTH)['line-to'](r0_SB, r0_SMOOTH)['cubic-to'](r0_SB, r0_COBKAPPA * r0_SMOOTH, r0_SB + (1 - r0_BKAPPA) * (r0_WIDTH / 2 - r0_SB), r0_O, r0_WIDTH / 2, r0_O)['cubic-to'](r0_MIDDLE + r0_BKAPPA * (r0_RIGHTSB - r0_MIDDLE), r0_O, r0_RIGHTSB, r0_COBKAPPA * r0_SMOOTH, r0_RIGHTSB, r0_SMOOTH)['line-to'](r0_RIGHTSB, r0_CAP / 2 + r0_STROKE / 2); + r31_xn$putshapes$9Jrj(r31_outline['form-stroke'](r0_STROKE, 0)); + r31_bar = new r0_Stroke()['start-from'](r0_MIDDLE, r0_CAP / 2 + r0_STROKE / 2)['line-to'](r0_RIGHTSB, r0_CAP / 2 + r0_STROKE / 2); + r31_xn$putshapes$9Jrj(r31_bar['form-stroke'](0, r0_STROKE)); + return void 0; + }); + r0_xn$createglyph$7Hrq('O', function _r0_t14() { + var r33_xn$setwidth$9Jrj, r33_xn$assignunicode$7Hrq, r33_xn$startfrom$1aao, r33_xn$lineto$5sIl, r33_xn$curveto$1aao, r33_xn$cubicto$1aao, r33_xn$putshapes$9Jrj, r33_xn$reverselast$3qIs, r33_xn$includeglyph$3qIs, r33_outline, _r33_t0; + _r33_t0 = this; + r33_xn$setwidth$9Jrj = _r33_t0['set-width']['bind'](_r33_t0); + r33_xn$assignunicode$7Hrq = _r33_t0['assign-unicode']['bind'](_r33_t0); + r33_xn$startfrom$1aao = _r33_t0['start-from']['bind'](_r33_t0); + r33_xn$lineto$5sIl = _r33_t0['line-to']['bind'](_r33_t0); + r33_xn$curveto$1aao = _r33_t0['curve-to']['bind'](_r33_t0); + r33_xn$cubicto$1aao = _r33_t0['cubic-to']['bind'](_r33_t0); + r33_xn$putshapes$9Jrj = _r33_t0['put-shapes']['bind'](_r33_t0); + r33_xn$reverselast$3qIs = _r33_t0['reverse-last']['bind'](_r33_t0); + r33_xn$includeglyph$3qIs = _r33_t0['include-glyph']['bind'](_r33_t0); + r33_xn$setwidth$9Jrj(r0_WIDTH); + r33_xn$assignunicode$7Hrq('O'); + r33_outline = new r0_Stroke(); + r33_outline['start-from'](r0_MIDDLE, r0_CAPO)['cubic-to'](r0_SB + (1 - r0_BKAPPA) * (r0_WIDTH / 2 - r0_SB), r0_CAPO, r0_SB, r0_CAP - r0_COBKAPPA * r0_SMOOTH, r0_SB, r0_CAP - r0_SMOOTH)['line-to'](r0_SB, r0_SMOOTH)['cubic-to'](r0_SB, r0_COBKAPPA * r0_SMOOTH, r0_SB + (1 - r0_BKAPPA) * (r0_WIDTH / 2 - r0_SB), r0_O, r0_WIDTH / 2, r0_O)['cubic-to'](r0_MIDDLE + r0_BKAPPA * (r0_RIGHTSB - r0_MIDDLE), r0_O, r0_RIGHTSB, r0_COBKAPPA * r0_SMOOTH, r0_RIGHTSB, r0_SMOOTH)['line-to'](r0_RIGHTSB, r0_CAP - r0_SMOOTH)['cubic-to'](r0_RIGHTSB, r0_CAP - r0_COBKAPPA * r0_SMOOTH, r0_MIDDLE + r0_BKAPPA * (r0_RIGHTSB - r0_MIDDLE), r0_CAPO, r0_MIDDLE, r0_CAPO); + r33_xn$putshapes$9Jrj(r33_outline['form-stroke'](r0_STROKE, 0)); + return void 0; + }); + r0_xn$createglyph$7Hrq('zero.slashed', function _r0_t15() { + var r35_xn$setwidth$9Jrj, r35_xn$assignunicode$7Hrq, r35_xn$startfrom$1aao, r35_xn$lineto$5sIl, r35_xn$curveto$1aao, r35_xn$cubicto$1aao, r35_xn$putshapes$9Jrj, r35_xn$reverselast$3qIs, r35_xn$includeglyph$3qIs, r35_bar, _r35_t0; + _r35_t0 = this; + r35_xn$setwidth$9Jrj = _r35_t0['set-width']['bind'](_r35_t0); + r35_xn$assignunicode$7Hrq = _r35_t0['assign-unicode']['bind'](_r35_t0); + r35_xn$startfrom$1aao = _r35_t0['start-from']['bind'](_r35_t0); + r35_xn$lineto$5sIl = _r35_t0['line-to']['bind'](_r35_t0); + r35_xn$curveto$1aao = _r35_t0['curve-to']['bind'](_r35_t0); + r35_xn$cubicto$1aao = _r35_t0['cubic-to']['bind'](_r35_t0); + r35_xn$putshapes$9Jrj = _r35_t0['put-shapes']['bind'](_r35_t0); + r35_xn$reverselast$3qIs = _r35_t0['reverse-last']['bind'](_r35_t0); + r35_xn$includeglyph$3qIs = _r35_t0['include-glyph']['bind'](_r35_t0); + r35_xn$setwidth$9Jrj(r0_WIDTH); + r35_xn$putshapes$9Jrj(r0_glyphs['O']['contours']); + r35_bar = new r0_Stroke()['start-from'](r0_SB + r0_STROKE / 2, r0_CAP * (1 - 0.65))['line-to'](r0_RIGHTSB - r0_STROKE / 2, r0_CAP * 0.65); + r35_xn$putshapes$9Jrj(r35_bar['form-stroke'](r0_STROKE / 2, r0_STROKE / 2)); + return void 0; + }); + r0_xn$createglyph$7Hrq('zero.unslashed', function _r0_t16() { + var r37_xn$setwidth$9Jrj, r37_xn$assignunicode$7Hrq, r37_xn$startfrom$1aao, r37_xn$lineto$5sIl, r37_xn$curveto$1aao, r37_xn$cubicto$1aao, r37_xn$putshapes$9Jrj, r37_xn$reverselast$3qIs, r37_xn$includeglyph$3qIs, _r37_t0; + _r37_t0 = this; + r37_xn$setwidth$9Jrj = _r37_t0['set-width']['bind'](_r37_t0); + r37_xn$assignunicode$7Hrq = _r37_t0['assign-unicode']['bind'](_r37_t0); + r37_xn$startfrom$1aao = _r37_t0['start-from']['bind'](_r37_t0); + r37_xn$lineto$5sIl = _r37_t0['line-to']['bind'](_r37_t0); + r37_xn$curveto$1aao = _r37_t0['curve-to']['bind'](_r37_t0); + r37_xn$cubicto$1aao = _r37_t0['cubic-to']['bind'](_r37_t0); + r37_xn$putshapes$9Jrj = _r37_t0['put-shapes']['bind'](_r37_t0); + r37_xn$reverselast$3qIs = _r37_t0['reverse-last']['bind'](_r37_t0); + r37_xn$includeglyph$3qIs = _r37_t0['include-glyph']['bind'](_r37_t0); + r37_xn$includeglyph$3qIs(r0_glyphs['O']); + return void 0; + }); + r0_xn$createglyph$7Hrq('zero.dotted', function _r0_t17() { + var r39_xn$setwidth$9Jrj, r39_xn$assignunicode$7Hrq, r39_xn$startfrom$1aao, r39_xn$lineto$5sIl, r39_xn$curveto$1aao, r39_xn$cubicto$1aao, r39_xn$putshapes$9Jrj, r39_xn$reverselast$3qIs, r39_xn$includeglyph$3qIs, _r39_t0; + _r39_t0 = this; + r39_xn$setwidth$9Jrj = _r39_t0['set-width']['bind'](_r39_t0); + r39_xn$assignunicode$7Hrq = _r39_t0['assign-unicode']['bind'](_r39_t0); + r39_xn$startfrom$1aao = _r39_t0['start-from']['bind'](_r39_t0); + r39_xn$lineto$5sIl = _r39_t0['line-to']['bind'](_r39_t0); + r39_xn$curveto$1aao = _r39_t0['curve-to']['bind'](_r39_t0); + r39_xn$cubicto$1aao = _r39_t0['cubic-to']['bind'](_r39_t0); + r39_xn$putshapes$9Jrj = _r39_t0['put-shapes']['bind'](_r39_t0); + r39_xn$reverselast$3qIs = _r39_t0['reverse-last']['bind'](_r39_t0); + r39_xn$includeglyph$3qIs = _r39_t0['include-glyph']['bind'](_r39_t0); + r39_xn$includeglyph$3qIs(r0_glyphs['O']); + r39_xn$putshapes$9Jrj([r0_Ring(r0_CAPMIDDLE + r0_DOTRADIUS, r0_CAPMIDDLE - r0_DOTRADIUS, r0_MIDDLE + r0_DOTRADIUS, r0_MIDDLE - r0_DOTRADIUS)]); + return void 0; + }); + r0_xn$createglyph$7Hrq('zero', function _r0_t18() { + var r41_xn$setwidth$9Jrj, r41_xn$assignunicode$7Hrq, r41_xn$startfrom$1aao, r41_xn$lineto$5sIl, r41_xn$curveto$1aao, r41_xn$cubicto$1aao, r41_xn$putshapes$9Jrj, r41_xn$reverselast$3qIs, r41_xn$includeglyph$3qIs, r41_otherwise, _r41_t0, _r41_t1, _r41_t2, _r41_t3, _r41_t4, _r41_t5, _r41_t6, _r41_t7; + _r41_t1 = this; + r41_xn$setwidth$9Jrj = _r41_t1['set-width']['bind'](_r41_t1); + r41_xn$assignunicode$7Hrq = _r41_t1['assign-unicode']['bind'](_r41_t1); + r41_xn$startfrom$1aao = _r41_t1['start-from']['bind'](_r41_t1); + r41_xn$lineto$5sIl = _r41_t1['line-to']['bind'](_r41_t1); + r41_xn$curveto$1aao = _r41_t1['curve-to']['bind'](_r41_t1); + r41_xn$cubicto$1aao = _r41_t1['cubic-to']['bind'](_r41_t1); + r41_xn$putshapes$9Jrj = _r41_t1['put-shapes']['bind'](_r41_t1); + r41_xn$reverselast$3qIs = _r41_t1['reverse-last']['bind'](_r41_t1); + r41_xn$includeglyph$3qIs = _r41_t1['include-glyph']['bind'](_r41_t1); + r41_xn$setwidth$9Jrj(r0_WIDTH); + r41_xn$assignunicode$7Hrq('0'); + _r41_t2 = r41_xn$includeglyph$3qIs; + _r41_t3 = r0_glyphs; + _r41_t0 = r0_variantSelector['zero']; + if ('slashed' === _r41_t0) { + _r41_t4 = 'zero.slashed'; + } else { + if ('dotted' === _r41_t0) { + _r41_t5 = 'zero.dotted'; + } else { + if ('unslahsed' === _r41_t0) { + _r41_t6 = 'zero.unslashed'; + } else { + r41_otherwise = _r41_t0; + _r41_t6 = 'zero.slashed'; + } + _r41_t5 = _r41_t6; + } + _r41_t4 = _r41_t5; + } + _r41_t7 = _r41_t3[_r41_t4]; + _r41_t2(_r41_t7); + return void 0; + }); + r0_xn$createglyph$7Hrq('Q', function _r0_t19() { + var r43_xn$setwidth$9Jrj, r43_xn$assignunicode$7Hrq, r43_xn$startfrom$1aao, r43_xn$lineto$5sIl, r43_xn$curveto$1aao, r43_xn$cubicto$1aao, r43_xn$putshapes$9Jrj, r43_xn$reverselast$3qIs, r43_xn$includeglyph$3qIs, _r43_t0; _r43_t0 = this; r43_xn$setwidth$9Jrj = _r43_t0['set-width']['bind'](_r43_t0); r43_xn$assignunicode$7Hrq = _r43_t0['assign-unicode']['bind'](_r43_t0); @@ -592,57 +448,56 @@ r43_xn$cubicto$1aao = _r43_t0['cubic-to']['bind'](_r43_t0); r43_xn$putshapes$9Jrj = _r43_t0['put-shapes']['bind'](_r43_t0); r43_xn$reverselast$3qIs = _r43_t0['reverse-last']['bind'](_r43_t0); + r43_xn$includeglyph$3qIs = _r43_t0['include-glyph']['bind'](_r43_t0); r43_xn$setwidth$9Jrj(r0_WIDTH); - r43_xn$assignunicode$7Hrq('Y'); - r43_TURN = r0_XH * 0.05; - r43_straight = 0.6; - r43_strench = 0.15; - r43_cross = r0_CAP * 0.4; - r43_barone = new r0_Stroke()['start-from'](r0_MIDDLE, r43_cross)['set-width'](r0_HALFSTROKE, r0_HALFSTROKE)['line-to'](r0_MIDDLE + r43_straight * (r0_RIGHTSB - r0_HALFSTROKE - r0_MIDDLE), r43_cross + r43_straight * (r0_CAP - r43_TURN - r43_strench * (r0_CAP - r43_TURN) - r43_cross))['curve-to'](r0_RIGHTSB - r0_HALFSTROKE, r0_CAP - r43_TURN - r43_strench * (r0_CAP - r43_TURN), r0_RIGHTSB - r0_HALFSTROKE, r0_CAP - r43_TURN)['line-to'](r0_RIGHTSB - r0_HALFSTROKE, r0_CAP)['form-stroke'](); - r43_bartwo = [r43_barone[0]['map'](function _r43_t1(r44_pt) { - var r44_pt; - return { - 'x': r0_WIDTH - r44_pt['x'], - 'y': r44_pt['y'], - 'onCurve': r44_pt['onCurve'], - 'cubic': r44_pt['cubic'] - }; - })['reverse']()]; - r43_xn$putshapes$9Jrj(r43_barone); - r43_xn$putshapes$9Jrj(r43_bartwo); - r43_xn$putshapes$9Jrj(new r0_Stroke()['start-from'](r0_MIDDLE, 0)['set-width'](r0_HALFSTROKE, r0_HALFSTROKE)['line-to'](r0_MIDDLE, r43_cross + r0_HALFSTROKE)['form-stroke']()); + r43_xn$assignunicode$7Hrq('Q'); + r43_xn$putshapes$9Jrj(r0_glyphs['O']['contours']); + r43_xn$startfrom$1aao(r0_MIDDLE, 0); + r43_xn$lineto$5sIl(r0_MIDDLE + r0_STROKE / 2, -r0_CAP * 0.2); + r43_xn$lineto$5sIl(r0_MIDDLE + r0_STROKE / 2 + r0_STROKE, -r0_CAP * 0.2); + r43_xn$lineto$5sIl(r0_MIDDLE + r0_STROKE, 0); + r43_xn$lineto$5sIl(r0_MIDDLE + r0_STROKE * (1 - 0.5 / 3), r0_STROKE * 0.5); + r43_xn$reverselast$3qIs(); return void 0; }); - r0_xn$createglyph$7Hrq('x', function _r0_t29() { - var r46_xn$setwidth$9Jrj, r46_xn$assignunicode$7Hrq, r46_xn$startfrom$1aao, r46_xn$lineto$5sIl, r46_xn$curveto$1aao, r46_xn$cubicto$1aao, r46_xn$putshapes$9Jrj, r46_xn$reverselast$3qIs, r46_TURN, r46_barone, r46_bartwo, _r46_t0, _r46_t1; - _r46_t0 = this; - r46_xn$setwidth$9Jrj = _r46_t0['set-width']['bind'](_r46_t0); - r46_xn$assignunicode$7Hrq = _r46_t0['assign-unicode']['bind'](_r46_t0); - r46_xn$startfrom$1aao = _r46_t0['start-from']['bind'](_r46_t0); - r46_xn$lineto$5sIl = _r46_t0['line-to']['bind'](_r46_t0); - r46_xn$curveto$1aao = _r46_t0['curve-to']['bind'](_r46_t0); - r46_xn$cubicto$1aao = _r46_t0['cubic-to']['bind'](_r46_t0); - r46_xn$putshapes$9Jrj = _r46_t0['put-shapes']['bind'](_r46_t0); - r46_xn$reverselast$3qIs = _r46_t0['reverse-last']['bind'](_r46_t0); - r46_xn$setwidth$9Jrj(r0_WIDTH); - r46_xn$assignunicode$7Hrq('x'); - r46_TURN = r0_XH * 0.1; - r46_barone = new r0_Stroke()['start-from'](r0_SB + r0_HALFSTROKE, 0)['set-width'](r0_HALFSTROKE, r0_HALFSTROKE)['cubic-to'](r0_SB + r0_HALFSTROKE, r46_TURN + 0.17 * (r0_XH - r46_TURN), r0_RIGHTSB - r0_HALFSTROKE, r0_XH - r46_TURN - 0.17 * (r0_XH - r46_TURN), r0_RIGHTSB - r0_HALFSTROKE, r0_XH)['form-stroke'](); - r46_bartwo = [r46_barone[0]['map'](function _r46_t1(r47_pt) { - var r47_pt; - return { - 'x': r0_WIDTH - r47_pt['x'], - 'y': r47_pt['y'], - 'onCurve': r47_pt['onCurve'], - 'cubic': r47_pt['cubic'] - }; - })['reverse']()]; - r46_xn$putshapes$9Jrj(r46_barone); - r46_xn$putshapes$9Jrj(r46_bartwo); + r0_xn$createglyph$7Hrq('H', function _r0_t20() { + var r45_xn$setwidth$9Jrj, r45_xn$assignunicode$7Hrq, r45_xn$startfrom$1aao, r45_xn$lineto$5sIl, r45_xn$curveto$1aao, r45_xn$cubicto$1aao, r45_xn$putshapes$9Jrj, r45_xn$reverselast$3qIs, r45_xn$includeglyph$3qIs, _r45_t0; + _r45_t0 = this; + r45_xn$setwidth$9Jrj = _r45_t0['set-width']['bind'](_r45_t0); + r45_xn$assignunicode$7Hrq = _r45_t0['assign-unicode']['bind'](_r45_t0); + r45_xn$startfrom$1aao = _r45_t0['start-from']['bind'](_r45_t0); + r45_xn$lineto$5sIl = _r45_t0['line-to']['bind'](_r45_t0); + r45_xn$curveto$1aao = _r45_t0['curve-to']['bind'](_r45_t0); + r45_xn$cubicto$1aao = _r45_t0['cubic-to']['bind'](_r45_t0); + r45_xn$putshapes$9Jrj = _r45_t0['put-shapes']['bind'](_r45_t0); + r45_xn$reverselast$3qIs = _r45_t0['reverse-last']['bind'](_r45_t0); + r45_xn$includeglyph$3qIs = _r45_t0['include-glyph']['bind'](_r45_t0); + r45_xn$setwidth$9Jrj(r0_WIDTH); + r45_xn$assignunicode$7Hrq('H'); + r45_xn$putshapes$9Jrj(new r0_Stroke()['start-from'](r0_SB, 0)['set-width'](0, r0_STROKE)['line-to'](r0_SB, r0_CAP)['form-stroke']()); + r45_xn$putshapes$9Jrj(new r0_Stroke()['start-from'](r0_RIGHTSB, 0)['set-width'](r0_STROKE, 0)['line-to'](r0_RIGHTSB, r0_CAP)['form-stroke']()); + r45_xn$putshapes$9Jrj(new r0_Stroke()['start-from'](r0_SB, r0_CAP / 2)['set-width'](r0_HALFSTROKE, r0_HALFSTROKE)['line-to'](r0_RIGHTSB, r0_CAP / 2)['form-stroke']()); return void 0; }); - r0_xn$createglyph$7Hrq('B', function _r0_t30() { - var r49_xn$setwidth$9Jrj, r49_xn$assignunicode$7Hrq, r49_xn$startfrom$1aao, r49_xn$lineto$5sIl, r49_xn$curveto$1aao, r49_xn$cubicto$1aao, r49_xn$putshapes$9Jrj, r49_xn$reverselast$3qIs, r49_bowl, r49_tkappa, r49_bkappa, r49_turntop, r49_turnbottom, r49_topbowl, r49_bottombowl, r49_leftbar, _r49_t0; + r0_xn$createglyph$7Hrq('L', function _r0_t21() { + var r47_xn$setwidth$9Jrj, r47_xn$assignunicode$7Hrq, r47_xn$startfrom$1aao, r47_xn$lineto$5sIl, r47_xn$curveto$1aao, r47_xn$cubicto$1aao, r47_xn$putshapes$9Jrj, r47_xn$reverselast$3qIs, r47_xn$includeglyph$3qIs, _r47_t0; + _r47_t0 = this; + r47_xn$setwidth$9Jrj = _r47_t0['set-width']['bind'](_r47_t0); + r47_xn$assignunicode$7Hrq = _r47_t0['assign-unicode']['bind'](_r47_t0); + r47_xn$startfrom$1aao = _r47_t0['start-from']['bind'](_r47_t0); + r47_xn$lineto$5sIl = _r47_t0['line-to']['bind'](_r47_t0); + r47_xn$curveto$1aao = _r47_t0['curve-to']['bind'](_r47_t0); + r47_xn$cubicto$1aao = _r47_t0['cubic-to']['bind'](_r47_t0); + r47_xn$putshapes$9Jrj = _r47_t0['put-shapes']['bind'](_r47_t0); + r47_xn$reverselast$3qIs = _r47_t0['reverse-last']['bind'](_r47_t0); + r47_xn$includeglyph$3qIs = _r47_t0['include-glyph']['bind'](_r47_t0); + r47_xn$setwidth$9Jrj(r0_WIDTH); + r47_xn$assignunicode$7Hrq('L'); + r47_xn$putshapes$9Jrj(new r0_Stroke()['start-from'](r0_SB * 1.5, r0_CAP)['line-to'](r0_SB * 1.5, 0)['line-to'](r0_RIGHTSB, 0)['form-stroke'](r0_STROKE, 0)); + return void 0; + }); + r0_xn$createglyph$7Hrq('S', function _r0_t22() { + var r49_xn$setwidth$9Jrj, r49_xn$assignunicode$7Hrq, r49_xn$startfrom$1aao, r49_xn$lineto$5sIl, r49_xn$curveto$1aao, r49_xn$cubicto$1aao, r49_xn$putshapes$9Jrj, r49_xn$reverselast$3qIs, r49_xn$includeglyph$3qIs, r49_slope, r49_bowltop, r49_strokemiddle, r49_bowlbottom, _r49_t0; _r49_t0 = this; r49_xn$setwidth$9Jrj = _r49_t0['set-width']['bind'](_r49_t0); r49_xn$assignunicode$7Hrq = _r49_t0['assign-unicode']['bind'](_r49_t0); @@ -652,25 +507,23 @@ r49_xn$cubicto$1aao = _r49_t0['cubic-to']['bind'](_r49_t0); r49_xn$putshapes$9Jrj = _r49_t0['put-shapes']['bind'](_r49_t0); r49_xn$reverselast$3qIs = _r49_t0['reverse-last']['bind'](_r49_t0); + r49_xn$includeglyph$3qIs = _r49_t0['include-glyph']['bind'](_r49_t0); r49_xn$setwidth$9Jrj(r0_WIDTH); - r49_xn$assignunicode$7Hrq('B'); - r49_bowl = 451; - r49_tkappa = r0_COKAPPA - 0.22; - r49_bkappa = r0_COKAPPA - 0.2; - r49_turntop = (r0_CAP + (r49_bowl - r0_STROKE)) / 2; - r49_turnbottom = r49_bowl / 2; - r49_topbowl = new r0_Stroke(); - r49_topbowl['start-from'](r0_SB, r0_CAP)['line-to'](r0_RIGHTSB - r0_SB * 0.5 - r49_turnbottom, r0_CAP)['cubic-to'](r0_RIGHTSB - r0_SB * 0.5 - r49_tkappa * r49_turnbottom, r0_CAP, r0_RIGHTSB - r0_SB * 0.5, r49_turntop + (r0_CAP - r49_turntop) * r0_KAPPA, r0_RIGHTSB - r0_SB * 0.5, r49_turntop)['cubic-to'](r0_RIGHTSB - r0_SB * 0.5, r49_turntop + r0_KAPPA * (r49_bowl - r0_STROKE - r49_turntop), r0_RIGHTSB - r0_SB * 0.5 - r49_tkappa * r49_turnbottom, r49_bowl - r0_STROKE, r0_RIGHTSB - r0_SB * 0.5 - r49_turnbottom, r49_bowl - r0_STROKE)['line-to'](r0_SB, r49_bowl - r0_STROKE); - r49_bottombowl = new r0_Stroke(); - r49_bottombowl['start-from'](r0_SB, 0)['line-to'](r0_RIGHTSB - r49_turnbottom, 0)['cubic-to'](r0_RIGHTSB - r49_bkappa * r49_turnbottom, 0, r0_RIGHTSB, r49_turnbottom * r0_KAPPA, r0_RIGHTSB, r49_turnbottom)['cubic-to'](r0_RIGHTSB, r49_turnbottom + r0_KAPPA * (r49_bowl - r49_turnbottom), r0_RIGHTSB - r49_bkappa * r49_turnbottom, r49_bowl, r0_RIGHTSB - r49_turnbottom, r49_bowl)['line-to'](r0_SB, r49_bowl); - r49_leftbar = new r0_Stroke()['start-from'](r0_SB, 0)['line-to'](r0_SB, r0_CAP); - r49_xn$putshapes$9Jrj(r49_topbowl['form-stroke'](0, r0_STROKE)); - r49_xn$putshapes$9Jrj(r49_bottombowl['form-stroke'](r0_STROKE, 0)); - r49_xn$putshapes$9Jrj(r49_leftbar['form-stroke'](0, r0_STROKE)); + r49_xn$assignunicode$7Hrq('S'); + r49_slope = 0.11; + r49_bowltop = new r0_Stroke(); + r49_bowltop['start-from'](r0_RIGHTSB - r0_SB * 0.1, r0_CAP - r0_HOOK)['set-width'](r0_STROKE, 0)['curve-to'](r0_MIDDLE + r0_KAPPA_HOOK * (r0_MIDDLE - r0_para['sb']), r0_CAPO, r0_MIDDLE, r0_CAPO)['cubic-to'](r0_SB + (1 - r0_BKAPPA) * (r0_WIDTH / 2 - r0_SB), r0_CAPO, r0_SB, r0_CAP - r0_COBKAPPA * r0_SMOOTH, r0_SB, r0_CAP_SMOOTH); + r49_strokemiddle = new r0_Stroke(); + r49_strokemiddle['start-from'](r0_SB + r0_STROKE / 2, r0_CAP_SMOOTH)['set-width'](r0_STROKE / 2, r0_STROKE / 2)['curve-to'](r0_SB + r0_STROKE / 2, (0.5 + r49_slope) * r0_CAP + 2 * r49_slope * r0_CAP / (0.4 * r0_WIDTH) * (0.3 * r0_WIDTH - r0_SB - r0_STROKE / 2), 0.3 * r0_WIDTH, (0.5 + r49_slope) * r0_CAP)['line-to'](0.7 * r0_WIDTH, (0.5 - r49_slope) * r0_CAP)['curve-to'](r0_RIGHTSB - r0_STROKE / 2, (0.5 - r49_slope) * r0_CAP - 2 * r49_slope * r0_CAP / (0.4 * r0_WIDTH) * (0.3 * r0_WIDTH - r0_SB - r0_STROKE / 2), r0_RIGHTSB - r0_STROKE / 2, r0_SMOOTH); + r49_bowlbottom = new r0_Stroke(); + r49_bowlbottom['start-from'](r0_RIGHTSB, r0_SMOOTH)['set-width'](0, r0_STROKE)['cubic-to'](r0_RIGHTSB, r0_COBKAPPA * r0_SMOOTH, r0_MIDDLE + r0_BKAPPA * (r0_RIGHTSB - r0_MIDDLE), r0_O, r0_MIDDLE, r0_O)['curve-to'](r0_MIDDLE - r0_KAPPA_HOOK * (r0_MIDDLE - r0_para['sb']), r0_O, r0_SB * 1.1, r0_HOOK); + r49_xn$putshapes$9Jrj(r49_bowltop['form-stroke']()); + r49_xn$putshapes$9Jrj(r49_strokemiddle['form-stroke']()); + r49_xn$putshapes$9Jrj(r49_bowlbottom['form-stroke']()); return void 0; }); - r0_xn$createglyph$7Hrq('C', function _r0_t31() { - var r51_xn$setwidth$9Jrj, r51_xn$assignunicode$7Hrq, r51_xn$startfrom$1aao, r51_xn$lineto$5sIl, r51_xn$curveto$1aao, r51_xn$cubicto$1aao, r51_xn$putshapes$9Jrj, r51_xn$reverselast$3qIs, r51_outline, _r51_t0; + r0_xn$createglyph$7Hrq('dollar', function _r0_t23() { + var r51_xn$setwidth$9Jrj, r51_xn$assignunicode$7Hrq, r51_xn$startfrom$1aao, r51_xn$lineto$5sIl, r51_xn$curveto$1aao, r51_xn$cubicto$1aao, r51_xn$putshapes$9Jrj, r51_xn$reverselast$3qIs, r51_xn$includeglyph$3qIs, _r51_t0; _r51_t0 = this; r51_xn$setwidth$9Jrj = _r51_t0['set-width']['bind'](_r51_t0); r51_xn$assignunicode$7Hrq = _r51_t0['assign-unicode']['bind'](_r51_t0); @@ -680,15 +533,16 @@ r51_xn$cubicto$1aao = _r51_t0['cubic-to']['bind'](_r51_t0); r51_xn$putshapes$9Jrj = _r51_t0['put-shapes']['bind'](_r51_t0); r51_xn$reverselast$3qIs = _r51_t0['reverse-last']['bind'](_r51_t0); + r51_xn$includeglyph$3qIs = _r51_t0['include-glyph']['bind'](_r51_t0); r51_xn$setwidth$9Jrj(r0_WIDTH); - r51_xn$assignunicode$7Hrq('C'); - r51_outline = new r0_Stroke(); - r51_outline['start-from'](r0_RIGHTSB - r0_SB * 0.1, r0_CAP - r0_HOOK)['curve-to'](r0_MIDDLE + r0_KAPPA_HOOK * (r0_MIDDLE - r0_para['sb']), r0_CAPO, r0_MIDDLE, r0_CAPO)['cubic-to'](r0_SB + (1 - r0_BKAPPA) * (r0_WIDTH / 2 - r0_SB), r0_CAPO, r0_SB, r0_CAP - r0_COBKAPPA * r0_SMOOTH, r0_SB, r0_CAP_SMOOTH)['line-to'](r0_SB, r0_SMOOTH)['cubic-to'](r0_SB, r0_COBKAPPA * r0_SMOOTH, r0_SB + (1 - r0_BKAPPA) * (r0_WIDTH / 2 - r0_SB), r0_O, r0_WIDTH / 2, r0_O)['curve-to'](r0_MIDDLE + r0_KAPPA_HOOK * (r0_MIDDLE - r0_SB), r0_O, r0_RIGHTSB - r0_SB * 0.1, r0_HOOK); - r51_xn$putshapes$9Jrj(r51_outline['form-stroke'](r0_STROKE, 0)); + r51_xn$assignunicode$7Hrq('$'); + r51_xn$putshapes$9Jrj(r0_glyphs['S']['contours']); + r51_xn$putshapes$9Jrj(new r0_Stroke()['start-from'](r0_MIDDLE, r0_CAP)['set-width'](r0_HALFSTROKE, r0_HALFSTROKE)['line-to'](r0_MIDDLE, r0_CAP - r0_DESCENDER / 2)['form-stroke']()); + r51_xn$putshapes$9Jrj(new r0_Stroke()['start-from'](r0_MIDDLE, r0_DESCENDER / 2)['set-width'](r0_HALFSTROKE, r0_HALFSTROKE)['line-to'](r0_MIDDLE, 0)['form-stroke']()); return void 0; }); - r0_xn$createglyph$7Hrq('D', function _r0_t32() { - var r53_xn$setwidth$9Jrj, r53_xn$assignunicode$7Hrq, r53_xn$startfrom$1aao, r53_xn$lineto$5sIl, r53_xn$curveto$1aao, r53_xn$cubicto$1aao, r53_xn$putshapes$9Jrj, r53_xn$reverselast$3qIs, r53_dsmooth, r53_bsmooth, r53_bkappa, r53_leftbar, r53_bowl, _r53_t0; + r0_xn$createglyph$7Hrq('o', function _r0_t24() { + var r53_xn$setwidth$9Jrj, r53_xn$assignunicode$7Hrq, r53_xn$startfrom$1aao, r53_xn$lineto$5sIl, r53_xn$curveto$1aao, r53_xn$cubicto$1aao, r53_xn$putshapes$9Jrj, r53_xn$reverselast$3qIs, r53_xn$includeglyph$3qIs, _r53_t0; _r53_t0 = this; r53_xn$setwidth$9Jrj = _r53_t0['set-width']['bind'](_r53_t0); r53_xn$assignunicode$7Hrq = _r53_t0['assign-unicode']['bind'](_r53_t0); @@ -698,20 +552,18 @@ r53_xn$cubicto$1aao = _r53_t0['cubic-to']['bind'](_r53_t0); r53_xn$putshapes$9Jrj = _r53_t0['put-shapes']['bind'](_r53_t0); r53_xn$reverselast$3qIs = _r53_t0['reverse-last']['bind'](_r53_t0); + r53_xn$includeglyph$3qIs = _r53_t0['include-glyph']['bind'](_r53_t0); r53_xn$setwidth$9Jrj(r0_WIDTH); - r53_xn$assignunicode$7Hrq('D'); - r53_dsmooth = r0_SMOOTH * 1.55; - r53_bsmooth = r0_SMOOTH * 1.3; - r53_bkappa = r0_COKAPPA - 0.2; - r53_leftbar = new r0_Stroke()['start-from'](r0_SB, 0)['line-to'](r0_SB, r0_CAP); - r53_bowl = new r0_Stroke(); - r53_bowl['start-from'](r0_SB, 0)['line-to'](r0_RIGHTSB - r53_bsmooth, 0)['cubic-to'](r0_RIGHTSB - r53_bkappa * r53_bsmooth, 0, r0_RIGHTSB, r0_COBKAPPA * r53_dsmooth, r0_RIGHTSB, r53_dsmooth)['line-to'](r0_RIGHTSB, r0_CAP - r53_dsmooth)['cubic-to'](r0_RIGHTSB, r0_CAP - r0_COBKAPPA * r53_dsmooth, r0_RIGHTSB - r53_bkappa * r53_bsmooth, r0_CAP, r0_RIGHTSB - r53_bsmooth, r0_CAP)['line-to'](r0_SB, r0_CAP); - r53_xn$putshapes$9Jrj(r53_bowl['form-stroke'](r0_STROKE, 0)); - r53_xn$putshapes$9Jrj(r53_leftbar['form-stroke'](0, r0_STROKE)); + r53_xn$assignunicode$7Hrq('o'); + r53_xn$putshapes$9Jrj([ + r0_ORing(r0_XO, r0_O, r0_SB, r0_RIGHTSB, r0_SMALLSMOOTH), + r0_ORing(r0_XO - r0_STROKE, r0_O + r0_STROKE, r0_SB + r0_STROKE, r0_RIGHTSB - r0_STROKE, r0_SMALLSMOOTH - r0_STROKE) + ]); + r53_xn$reverselast$3qIs(); return void 0; }); - r0_xn$createglyph$7Hrq('G', function _r0_t33() { - var r55_xn$setwidth$9Jrj, r55_xn$assignunicode$7Hrq, r55_xn$startfrom$1aao, r55_xn$lineto$5sIl, r55_xn$curveto$1aao, r55_xn$cubicto$1aao, r55_xn$putshapes$9Jrj, r55_xn$reverselast$3qIs, r55_outline, r55_bar, _r55_t0; + r0_xn$createglyph$7Hrq('o.left', function _r0_t25() { + var r55_xn$setwidth$9Jrj, r55_xn$assignunicode$7Hrq, r55_xn$startfrom$1aao, r55_xn$lineto$5sIl, r55_xn$curveto$1aao, r55_xn$cubicto$1aao, r55_xn$putshapes$9Jrj, r55_xn$reverselast$3qIs, r55_xn$includeglyph$3qIs, _r55_t0; _r55_t0 = this; r55_xn$setwidth$9Jrj = _r55_t0['set-width']['bind'](_r55_t0); r55_xn$assignunicode$7Hrq = _r55_t0['assign-unicode']['bind'](_r55_t0); @@ -721,17 +573,17 @@ r55_xn$cubicto$1aao = _r55_t0['cubic-to']['bind'](_r55_t0); r55_xn$putshapes$9Jrj = _r55_t0['put-shapes']['bind'](_r55_t0); r55_xn$reverselast$3qIs = _r55_t0['reverse-last']['bind'](_r55_t0); + r55_xn$includeglyph$3qIs = _r55_t0['include-glyph']['bind'](_r55_t0); r55_xn$setwidth$9Jrj(r0_WIDTH); - r55_xn$assignunicode$7Hrq('G'); - r55_outline = new r0_Stroke(); - r55_outline['start-from'](r0_RIGHTSB - r0_SB * 0.1, r0_CAP - r0_HOOK)['curve-to'](r0_MIDDLE + r0_KAPPA_HOOK * (r0_MIDDLE - r0_para['sb']), r0_CAPO, r0_MIDDLE, r0_CAPO)['cubic-to'](r0_SB + (1 - r0_BKAPPA) * (r0_WIDTH / 2 - r0_SB), r0_CAPO, r0_SB, r0_CAP - r0_COBKAPPA * r0_SMOOTH, r0_SB, r0_CAP_SMOOTH)['line-to'](r0_SB, r0_SMOOTH)['cubic-to'](r0_SB, r0_COBKAPPA * r0_SMOOTH, r0_SB + (1 - r0_BKAPPA) * (r0_WIDTH / 2 - r0_SB), r0_O, r0_WIDTH / 2, r0_O)['cubic-to'](r0_MIDDLE + r0_BKAPPA * (r0_RIGHTSB - r0_MIDDLE), r0_O, r0_RIGHTSB, r0_COBKAPPA * r0_SMOOTH, r0_RIGHTSB, r0_SMOOTH)['line-to'](r0_RIGHTSB, r0_CAP / 2 + r0_STROKE / 2); - r55_xn$putshapes$9Jrj(r55_outline['form-stroke'](r0_STROKE, 0)); - r55_bar = new r0_Stroke()['start-from'](r0_MIDDLE, r0_CAP / 2 + r0_STROKE / 2)['line-to'](r0_RIGHTSB, r0_CAP / 2 + r0_STROKE / 2); - r55_xn$putshapes$9Jrj(r55_bar['form-stroke'](0, r0_STROKE)); + r55_xn$putshapes$9Jrj([ + r0_ORing(r0_XO, r0_O, r0_SB + r0_STROKE / 2, r0_RIGHTSB, r0_SMALLSMOOTH), + r0_ORing(r0_XO - r0_STROKE, r0_O + r0_STROKE, r0_SB + r0_STROKE, r0_RIGHTSB - r0_STROKE, r0_SMALLSMOOTH - r0_STROKE) + ]); + r55_xn$reverselast$3qIs(); return void 0; }); - r0_xn$createglyph$7Hrq('O', function _r0_t34() { - var r57_xn$setwidth$9Jrj, r57_xn$assignunicode$7Hrq, r57_xn$startfrom$1aao, r57_xn$lineto$5sIl, r57_xn$curveto$1aao, r57_xn$cubicto$1aao, r57_xn$putshapes$9Jrj, r57_xn$reverselast$3qIs, r57_outline, _r57_t0; + r0_xn$createglyph$7Hrq('o.right', function _r0_t26() { + var r57_xn$setwidth$9Jrj, r57_xn$assignunicode$7Hrq, r57_xn$startfrom$1aao, r57_xn$lineto$5sIl, r57_xn$curveto$1aao, r57_xn$cubicto$1aao, r57_xn$putshapes$9Jrj, r57_xn$reverselast$3qIs, r57_xn$includeglyph$3qIs, _r57_t0; _r57_t0 = this; r57_xn$setwidth$9Jrj = _r57_t0['set-width']['bind'](_r57_t0); r57_xn$assignunicode$7Hrq = _r57_t0['assign-unicode']['bind'](_r57_t0); @@ -741,15 +593,17 @@ r57_xn$cubicto$1aao = _r57_t0['cubic-to']['bind'](_r57_t0); r57_xn$putshapes$9Jrj = _r57_t0['put-shapes']['bind'](_r57_t0); r57_xn$reverselast$3qIs = _r57_t0['reverse-last']['bind'](_r57_t0); + r57_xn$includeglyph$3qIs = _r57_t0['include-glyph']['bind'](_r57_t0); r57_xn$setwidth$9Jrj(r0_WIDTH); - r57_xn$assignunicode$7Hrq('O'); - r57_outline = new r0_Stroke(); - r57_outline['start-from'](r0_MIDDLE, r0_CAPO)['cubic-to'](r0_SB + (1 - r0_BKAPPA) * (r0_WIDTH / 2 - r0_SB), r0_CAPO, r0_SB, r0_CAP - r0_COBKAPPA * r0_SMOOTH, r0_SB, r0_CAP - r0_SMOOTH)['line-to'](r0_SB, r0_SMOOTH)['cubic-to'](r0_SB, r0_COBKAPPA * r0_SMOOTH, r0_SB + (1 - r0_BKAPPA) * (r0_WIDTH / 2 - r0_SB), r0_O, r0_WIDTH / 2, r0_O)['cubic-to'](r0_MIDDLE + r0_BKAPPA * (r0_RIGHTSB - r0_MIDDLE), r0_O, r0_RIGHTSB, r0_COBKAPPA * r0_SMOOTH, r0_RIGHTSB, r0_SMOOTH)['line-to'](r0_RIGHTSB, r0_CAP - r0_SMOOTH)['cubic-to'](r0_RIGHTSB, r0_CAP - r0_COBKAPPA * r0_SMOOTH, r0_MIDDLE + r0_BKAPPA * (r0_RIGHTSB - r0_MIDDLE), r0_CAPO, r0_MIDDLE, r0_CAPO); - r57_xn$putshapes$9Jrj(r57_outline['form-stroke'](r0_STROKE, 0)); + r57_xn$putshapes$9Jrj([ + r0_ORing(r0_XO, r0_O, r0_SB, r0_RIGHTSB - r0_STROKE / 2, r0_SMALLSMOOTH), + r0_ORing(r0_XO - r0_STROKE, r0_O + r0_STROKE, r0_SB + r0_STROKE, r0_RIGHTSB - r0_STROKE, r0_SMALLSMOOTH - r0_STROKE) + ]); + r57_xn$reverselast$3qIs(); return void 0; }); - r0_xn$createglyph$7Hrq('o', function _r0_t35() { - var r59_xn$setwidth$9Jrj, r59_xn$assignunicode$7Hrq, r59_xn$startfrom$1aao, r59_xn$lineto$5sIl, r59_xn$curveto$1aao, r59_xn$cubicto$1aao, r59_xn$putshapes$9Jrj, r59_xn$reverselast$3qIs, _r59_t0; + r0_xn$createglyph$7Hrq('p', function _r0_t27() { + var r59_xn$setwidth$9Jrj, r59_xn$assignunicode$7Hrq, r59_xn$startfrom$1aao, r59_xn$lineto$5sIl, r59_xn$curveto$1aao, r59_xn$cubicto$1aao, r59_xn$putshapes$9Jrj, r59_xn$reverselast$3qIs, r59_xn$includeglyph$3qIs, _r59_t0; _r59_t0 = this; r59_xn$setwidth$9Jrj = _r59_t0['set-width']['bind'](_r59_t0); r59_xn$assignunicode$7Hrq = _r59_t0['assign-unicode']['bind'](_r59_t0); @@ -759,17 +613,15 @@ r59_xn$cubicto$1aao = _r59_t0['cubic-to']['bind'](_r59_t0); r59_xn$putshapes$9Jrj = _r59_t0['put-shapes']['bind'](_r59_t0); r59_xn$reverselast$3qIs = _r59_t0['reverse-last']['bind'](_r59_t0); + r59_xn$includeglyph$3qIs = _r59_t0['include-glyph']['bind'](_r59_t0); r59_xn$setwidth$9Jrj(r0_WIDTH); - r59_xn$assignunicode$7Hrq('o'); - r59_xn$putshapes$9Jrj([ - r0_ORing(r0_XO, r0_O, r0_SB, r0_RIGHTSB, r0_SMALLSMOOTH), - r0_ORing(r0_XO - r0_STROKE, r0_O + r0_STROKE, r0_SB + r0_STROKE, r0_RIGHTSB - r0_STROKE, r0_SMALLSMOOTH - r0_STROKE) - ]); - r59_xn$reverselast$3qIs(); + r59_xn$assignunicode$7Hrq('p'); + r59_xn$putshapes$9Jrj(r0_glyphs['o.left']['contours']); + r59_xn$putshapes$9Jrj(new r0_Stroke()['start-from'](r0_SB, r0_XH)['set-width'](r0_STROKE, 0)['line-to'](r0_SB, r0_DESCENDER)['form-stroke']()); return void 0; }); - r0_xn$createglyph$7Hrq('o.left', function _r0_t36() { - var r61_xn$setwidth$9Jrj, r61_xn$assignunicode$7Hrq, r61_xn$startfrom$1aao, r61_xn$lineto$5sIl, r61_xn$curveto$1aao, r61_xn$cubicto$1aao, r61_xn$putshapes$9Jrj, r61_xn$reverselast$3qIs, _r61_t0; + r0_xn$createglyph$7Hrq('b', function _r0_t28() { + var r61_xn$setwidth$9Jrj, r61_xn$assignunicode$7Hrq, r61_xn$startfrom$1aao, r61_xn$lineto$5sIl, r61_xn$curveto$1aao, r61_xn$cubicto$1aao, r61_xn$putshapes$9Jrj, r61_xn$reverselast$3qIs, r61_xn$includeglyph$3qIs, _r61_t0; _r61_t0 = this; r61_xn$setwidth$9Jrj = _r61_t0['set-width']['bind'](_r61_t0); r61_xn$assignunicode$7Hrq = _r61_t0['assign-unicode']['bind'](_r61_t0); @@ -779,16 +631,15 @@ r61_xn$cubicto$1aao = _r61_t0['cubic-to']['bind'](_r61_t0); r61_xn$putshapes$9Jrj = _r61_t0['put-shapes']['bind'](_r61_t0); r61_xn$reverselast$3qIs = _r61_t0['reverse-last']['bind'](_r61_t0); + r61_xn$includeglyph$3qIs = _r61_t0['include-glyph']['bind'](_r61_t0); r61_xn$setwidth$9Jrj(r0_WIDTH); - r61_xn$putshapes$9Jrj([ - r0_ORing(r0_XO, r0_O, r0_SB + r0_STROKE / 2, r0_RIGHTSB, r0_SMALLSMOOTH), - r0_ORing(r0_XO - r0_STROKE, r0_O + r0_STROKE, r0_SB + r0_STROKE, r0_RIGHTSB - r0_STROKE, r0_SMALLSMOOTH - r0_STROKE) - ]); - r61_xn$reverselast$3qIs(); + r61_xn$assignunicode$7Hrq('b'); + r61_xn$putshapes$9Jrj(r0_glyphs['o.left']['contours']); + r61_xn$putshapes$9Jrj(new r0_Stroke()['start-from'](r0_SB, 0)['set-width'](0, r0_STROKE)['line-to'](r0_SB, r0_CAP)['form-stroke']()); return void 0; }); - r0_xn$createglyph$7Hrq('o.right', function _r0_t37() { - var r63_xn$setwidth$9Jrj, r63_xn$assignunicode$7Hrq, r63_xn$startfrom$1aao, r63_xn$lineto$5sIl, r63_xn$curveto$1aao, r63_xn$cubicto$1aao, r63_xn$putshapes$9Jrj, r63_xn$reverselast$3qIs, _r63_t0; + r0_xn$createglyph$7Hrq('q', function _r0_t29() { + var r63_xn$setwidth$9Jrj, r63_xn$assignunicode$7Hrq, r63_xn$startfrom$1aao, r63_xn$lineto$5sIl, r63_xn$curveto$1aao, r63_xn$cubicto$1aao, r63_xn$putshapes$9Jrj, r63_xn$reverselast$3qIs, r63_xn$includeglyph$3qIs, _r63_t0; _r63_t0 = this; r63_xn$setwidth$9Jrj = _r63_t0['set-width']['bind'](_r63_t0); r63_xn$assignunicode$7Hrq = _r63_t0['assign-unicode']['bind'](_r63_t0); @@ -798,16 +649,15 @@ r63_xn$cubicto$1aao = _r63_t0['cubic-to']['bind'](_r63_t0); r63_xn$putshapes$9Jrj = _r63_t0['put-shapes']['bind'](_r63_t0); r63_xn$reverselast$3qIs = _r63_t0['reverse-last']['bind'](_r63_t0); + r63_xn$includeglyph$3qIs = _r63_t0['include-glyph']['bind'](_r63_t0); r63_xn$setwidth$9Jrj(r0_WIDTH); - r63_xn$putshapes$9Jrj([ - r0_ORing(r0_XO, r0_O, r0_SB, r0_RIGHTSB - r0_STROKE / 2, r0_SMALLSMOOTH), - r0_ORing(r0_XO - r0_STROKE, r0_O + r0_STROKE, r0_SB + r0_STROKE, r0_RIGHTSB - r0_STROKE, r0_SMALLSMOOTH - r0_STROKE) - ]); - r63_xn$reverselast$3qIs(); + r63_xn$assignunicode$7Hrq('q'); + r63_xn$putshapes$9Jrj(r0_glyphs['o.right']['contours']); + r63_xn$putshapes$9Jrj(new r0_Stroke()['start-from'](r0_RIGHTSB, r0_XH)['set-width'](0, r0_STROKE)['line-to'](r0_RIGHTSB, r0_DESCENDER)['form-stroke']()); return void 0; }); - r0_xn$createglyph$7Hrq('p', function _r0_t38() { - var r65_xn$setwidth$9Jrj, r65_xn$assignunicode$7Hrq, r65_xn$startfrom$1aao, r65_xn$lineto$5sIl, r65_xn$curveto$1aao, r65_xn$cubicto$1aao, r65_xn$putshapes$9Jrj, r65_xn$reverselast$3qIs, _r65_t0; + r0_xn$createglyph$7Hrq('d', function _r0_t30() { + var r65_xn$setwidth$9Jrj, r65_xn$assignunicode$7Hrq, r65_xn$startfrom$1aao, r65_xn$lineto$5sIl, r65_xn$curveto$1aao, r65_xn$cubicto$1aao, r65_xn$putshapes$9Jrj, r65_xn$reverselast$3qIs, r65_xn$includeglyph$3qIs, _r65_t0; _r65_t0 = this; r65_xn$setwidth$9Jrj = _r65_t0['set-width']['bind'](_r65_t0); r65_xn$assignunicode$7Hrq = _r65_t0['assign-unicode']['bind'](_r65_t0); @@ -817,14 +667,15 @@ r65_xn$cubicto$1aao = _r65_t0['cubic-to']['bind'](_r65_t0); r65_xn$putshapes$9Jrj = _r65_t0['put-shapes']['bind'](_r65_t0); r65_xn$reverselast$3qIs = _r65_t0['reverse-last']['bind'](_r65_t0); + r65_xn$includeglyph$3qIs = _r65_t0['include-glyph']['bind'](_r65_t0); r65_xn$setwidth$9Jrj(r0_WIDTH); - r65_xn$assignunicode$7Hrq('p'); - r65_xn$putshapes$9Jrj(r0_glyphs['o.left']['contours']); - r65_xn$putshapes$9Jrj(new r0_Stroke()['start-from'](r0_SB, r0_XH)['set-width'](r0_STROKE, 0)['line-to'](r0_SB, r0_DESCENDER)['form-stroke']()); + r65_xn$assignunicode$7Hrq('d'); + r65_xn$putshapes$9Jrj(r0_glyphs['o.right']['contours']); + r65_xn$putshapes$9Jrj(new r0_Stroke()['start-from'](r0_RIGHTSB, 0)['set-width'](r0_STROKE, 0)['line-to'](r0_RIGHTSB, r0_CAP)['form-stroke']()); return void 0; }); - r0_xn$createglyph$7Hrq('b', function _r0_t39() { - var r67_xn$setwidth$9Jrj, r67_xn$assignunicode$7Hrq, r67_xn$startfrom$1aao, r67_xn$lineto$5sIl, r67_xn$curveto$1aao, r67_xn$cubicto$1aao, r67_xn$putshapes$9Jrj, r67_xn$reverselast$3qIs, _r67_t0; + r0_xn$createglyph$7Hrq('g', function _r0_t31() { + var r67_xn$setwidth$9Jrj, r67_xn$assignunicode$7Hrq, r67_xn$startfrom$1aao, r67_xn$lineto$5sIl, r67_xn$curveto$1aao, r67_xn$cubicto$1aao, r67_xn$putshapes$9Jrj, r67_xn$reverselast$3qIs, r67_xn$includeglyph$3qIs, r67_MODDLE, _r67_t0; _r67_t0 = this; r67_xn$setwidth$9Jrj = _r67_t0['set-width']['bind'](_r67_t0); r67_xn$assignunicode$7Hrq = _r67_t0['assign-unicode']['bind'](_r67_t0); @@ -834,14 +685,23 @@ r67_xn$cubicto$1aao = _r67_t0['cubic-to']['bind'](_r67_t0); r67_xn$putshapes$9Jrj = _r67_t0['put-shapes']['bind'](_r67_t0); r67_xn$reverselast$3qIs = _r67_t0['reverse-last']['bind'](_r67_t0); + r67_xn$includeglyph$3qIs = _r67_t0['include-glyph']['bind'](_r67_t0); r67_xn$setwidth$9Jrj(r0_WIDTH); - r67_xn$assignunicode$7Hrq('b'); - r67_xn$putshapes$9Jrj(r0_glyphs['o.left']['contours']); - r67_xn$putshapes$9Jrj(new r0_Stroke()['start-from'](r0_SB, 0)['set-width'](0, r0_STROKE)['line-to'](r0_SB, r0_CAP)['form-stroke']()); + r67_xn$assignunicode$7Hrq('g'); + r67_xn$putshapes$9Jrj([ + r0_Ring(r0_XO, r0_XH * 0.4, r0_SB * 1.5, r0_RIGHTSB - 0.5 * r0_SB, r0_SMALLSMOOTH), + r0_Ring(r0_XO - r0_STROKE, r0_XH * 0.4 + r0_STROKE, r0_SB * 1.5 + r0_STROKE, r0_RIGHTSB - 0.5 * r0_SB - r0_STROKE, r0_SMALLSMOOTH - r0_STROKE) + ]); + r67_xn$reverselast$3qIs(); + r67_xn$putshapes$9Jrj(new r0_Stroke()['start-from'](r0_MIDDLE, r0_XH * 0.4)['set-width'](0, r0_STROKE * 0.75)['arc-hv-to'](r0_SB * 1.5 + r0_STROKE, (r0_O - r0_DESCENDER * 0.85 + r0_XH * 0.4) / 2)['set-width'](0, r0_STROKE)['arc-vh-to'](r0_MIDDLE + r0_DESCENDER * 0.15, r0_O - r0_DESCENDER * 0.85)['line-to'](r0_MIDDLE - r0_DESCENDER * 0.15, r0_O - r0_DESCENDER * 0.85)['arc-hv-to'](r0_RIGHTSB - r0_O * 2, 0)['arc-vh-to'](r0_MIDDLE, r0_DESCENDER + r0_O)['arc-hv-to'](r0_SB, r0_DESCENDER * 0.1)['arc-vh-to'](r0_MIDDLE + r0_DESCENDER * 0.15, r0_O - r0_DESCENDER * 0.85)['form-stroke']()); + r67_xn$startfrom$1aao(r0_RIGHTSB, r0_XH); + r67_xn$lineto$5sIl(r0_RIGHTSB, r0_XH - r0_STROKE); + r67_xn$lineto$5sIl(r0_MIDDLE, r0_XH - r0_STROKE - r0_O); + r67_xn$lineto$5sIl(r67_MODDLE, r0_XH); return void 0; }); - r0_xn$createglyph$7Hrq('q', function _r0_t40() { - var r69_xn$setwidth$9Jrj, r69_xn$assignunicode$7Hrq, r69_xn$startfrom$1aao, r69_xn$lineto$5sIl, r69_xn$curveto$1aao, r69_xn$cubicto$1aao, r69_xn$putshapes$9Jrj, r69_xn$reverselast$3qIs, _r69_t0; + r0_xn$createglyph$7Hrq('x', function _r0_t32() { + var r69_xn$setwidth$9Jrj, r69_xn$assignunicode$7Hrq, r69_xn$startfrom$1aao, r69_xn$lineto$5sIl, r69_xn$curveto$1aao, r69_xn$cubicto$1aao, r69_xn$putshapes$9Jrj, r69_xn$reverselast$3qIs, r69_xn$includeglyph$3qIs, r69_TURN, r69_barone, r69_bartwo, _r69_t0, _r69_t1; _r69_t0 = this; r69_xn$setwidth$9Jrj = _r69_t0['set-width']['bind'](_r69_t0); r69_xn$assignunicode$7Hrq = _r69_t0['assign-unicode']['bind'](_r69_t0); @@ -851,170 +711,22 @@ r69_xn$cubicto$1aao = _r69_t0['cubic-to']['bind'](_r69_t0); r69_xn$putshapes$9Jrj = _r69_t0['put-shapes']['bind'](_r69_t0); r69_xn$reverselast$3qIs = _r69_t0['reverse-last']['bind'](_r69_t0); + r69_xn$includeglyph$3qIs = _r69_t0['include-glyph']['bind'](_r69_t0); r69_xn$setwidth$9Jrj(r0_WIDTH); - r69_xn$assignunicode$7Hrq('q'); - r69_xn$putshapes$9Jrj(r0_glyphs['o.right']['contours']); - r69_xn$putshapes$9Jrj(new r0_Stroke()['start-from'](r0_RIGHTSB, r0_XH)['set-width'](0, r0_STROKE)['line-to'](r0_RIGHTSB, r0_DESCENDER)['form-stroke']()); - return void 0; - }); - r0_xn$createglyph$7Hrq('g', function _r0_t41() { - var r71_xn$setwidth$9Jrj, r71_xn$assignunicode$7Hrq, r71_xn$startfrom$1aao, r71_xn$lineto$5sIl, r71_xn$curveto$1aao, r71_xn$cubicto$1aao, r71_xn$putshapes$9Jrj, r71_xn$reverselast$3qIs, r71_MODDLE, _r71_t0; - _r71_t0 = this; - r71_xn$setwidth$9Jrj = _r71_t0['set-width']['bind'](_r71_t0); - r71_xn$assignunicode$7Hrq = _r71_t0['assign-unicode']['bind'](_r71_t0); - r71_xn$startfrom$1aao = _r71_t0['start-from']['bind'](_r71_t0); - r71_xn$lineto$5sIl = _r71_t0['line-to']['bind'](_r71_t0); - r71_xn$curveto$1aao = _r71_t0['curve-to']['bind'](_r71_t0); - r71_xn$cubicto$1aao = _r71_t0['cubic-to']['bind'](_r71_t0); - r71_xn$putshapes$9Jrj = _r71_t0['put-shapes']['bind'](_r71_t0); - r71_xn$reverselast$3qIs = _r71_t0['reverse-last']['bind'](_r71_t0); - r71_xn$setwidth$9Jrj(r0_WIDTH); - r71_xn$assignunicode$7Hrq('g'); - r71_xn$putshapes$9Jrj([ - r0_Ring(r0_XO, r0_XH * 0.4, r0_SB * 1.5, r0_RIGHTSB - 0.5 * r0_SB, r0_SMALLSMOOTH), - r0_Ring(r0_XO - r0_STROKE, r0_XH * 0.4 + r0_STROKE, r0_SB * 1.5 + r0_STROKE, r0_RIGHTSB - 0.5 * r0_SB - r0_STROKE, r0_SMALLSMOOTH - r0_STROKE) - ]); - r71_xn$reverselast$3qIs(); - r71_xn$putshapes$9Jrj(new r0_Stroke()['start-from'](r0_MIDDLE, r0_XH * 0.4)['set-width'](0, r0_STROKE * 0.75)['arc-hv-to'](r0_SB * 1.5 + r0_STROKE, (r0_O - r0_DESCENDER * 0.85 + r0_XH * 0.4) / 2)['set-width'](0, r0_STROKE)['arc-vh-to'](r0_MIDDLE + r0_DESCENDER * 0.15, r0_O - r0_DESCENDER * 0.85)['line-to'](r0_MIDDLE - r0_DESCENDER * 0.15, r0_O - r0_DESCENDER * 0.85)['arc-hv-to'](r0_RIGHTSB - r0_O * 2, 0)['arc-vh-to'](r0_MIDDLE, r0_DESCENDER + r0_O)['arc-hv-to'](r0_SB, r0_DESCENDER * 0.1)['arc-vh-to'](r0_MIDDLE + r0_DESCENDER * 0.15, r0_O - r0_DESCENDER * 0.85)['form-stroke']()); - r71_xn$startfrom$1aao(r0_RIGHTSB, r0_XH); - r71_xn$lineto$5sIl(r0_RIGHTSB, r0_XH - r0_STROKE); - r71_xn$lineto$5sIl(r0_MIDDLE, r0_XH - r0_STROKE - r0_O); - r71_xn$lineto$5sIl(r71_MODDLE, r0_XH); - return void 0; - }); - r0_xn$createglyph$7Hrq('d', function _r0_t42() { - var r73_xn$setwidth$9Jrj, r73_xn$assignunicode$7Hrq, r73_xn$startfrom$1aao, r73_xn$lineto$5sIl, r73_xn$curveto$1aao, r73_xn$cubicto$1aao, r73_xn$putshapes$9Jrj, r73_xn$reverselast$3qIs, _r73_t0; - _r73_t0 = this; - r73_xn$setwidth$9Jrj = _r73_t0['set-width']['bind'](_r73_t0); - r73_xn$assignunicode$7Hrq = _r73_t0['assign-unicode']['bind'](_r73_t0); - r73_xn$startfrom$1aao = _r73_t0['start-from']['bind'](_r73_t0); - r73_xn$lineto$5sIl = _r73_t0['line-to']['bind'](_r73_t0); - r73_xn$curveto$1aao = _r73_t0['curve-to']['bind'](_r73_t0); - r73_xn$cubicto$1aao = _r73_t0['cubic-to']['bind'](_r73_t0); - r73_xn$putshapes$9Jrj = _r73_t0['put-shapes']['bind'](_r73_t0); - r73_xn$reverselast$3qIs = _r73_t0['reverse-last']['bind'](_r73_t0); - r73_xn$setwidth$9Jrj(r0_WIDTH); - r73_xn$assignunicode$7Hrq('d'); - r73_xn$putshapes$9Jrj(r0_glyphs['o.right']['contours']); - r73_xn$putshapes$9Jrj(new r0_Stroke()['start-from'](r0_RIGHTSB, 0)['set-width'](r0_STROKE, 0)['line-to'](r0_RIGHTSB, r0_CAP)['form-stroke']()); - return void 0; - }); - r0_xn$createglyph$7Hrq('zero', function _r0_t43() { - var r75_xn$setwidth$9Jrj, r75_xn$assignunicode$7Hrq, r75_xn$startfrom$1aao, r75_xn$lineto$5sIl, r75_xn$curveto$1aao, r75_xn$cubicto$1aao, r75_xn$putshapes$9Jrj, r75_xn$reverselast$3qIs, r75_bar, _r75_t0; - _r75_t0 = this; - r75_xn$setwidth$9Jrj = _r75_t0['set-width']['bind'](_r75_t0); - r75_xn$assignunicode$7Hrq = _r75_t0['assign-unicode']['bind'](_r75_t0); - r75_xn$startfrom$1aao = _r75_t0['start-from']['bind'](_r75_t0); - r75_xn$lineto$5sIl = _r75_t0['line-to']['bind'](_r75_t0); - r75_xn$curveto$1aao = _r75_t0['curve-to']['bind'](_r75_t0); - r75_xn$cubicto$1aao = _r75_t0['cubic-to']['bind'](_r75_t0); - r75_xn$putshapes$9Jrj = _r75_t0['put-shapes']['bind'](_r75_t0); - r75_xn$reverselast$3qIs = _r75_t0['reverse-last']['bind'](_r75_t0); - r75_xn$setwidth$9Jrj(r0_WIDTH); - r75_xn$assignunicode$7Hrq('0'); - r75_xn$putshapes$9Jrj(r0_glyphs['O']['contours']); - r75_bar = new r0_Stroke()['start-from'](r0_SB + r0_STROKE / 2, r0_CAP * (1 - 0.65))['line-to'](r0_RIGHTSB - r0_STROKE / 2, r0_CAP * 0.65); - r75_xn$putshapes$9Jrj(r75_bar['form-stroke'](r0_STROKE / 2, r0_STROKE / 2)); - return void 0; - }); - r0_xn$createglyph$7Hrq('Q', function _r0_t44() { - var r77_xn$setwidth$9Jrj, r77_xn$assignunicode$7Hrq, r77_xn$startfrom$1aao, r77_xn$lineto$5sIl, r77_xn$curveto$1aao, r77_xn$cubicto$1aao, r77_xn$putshapes$9Jrj, r77_xn$reverselast$3qIs, _r77_t0; - _r77_t0 = this; - r77_xn$setwidth$9Jrj = _r77_t0['set-width']['bind'](_r77_t0); - r77_xn$assignunicode$7Hrq = _r77_t0['assign-unicode']['bind'](_r77_t0); - r77_xn$startfrom$1aao = _r77_t0['start-from']['bind'](_r77_t0); - r77_xn$lineto$5sIl = _r77_t0['line-to']['bind'](_r77_t0); - r77_xn$curveto$1aao = _r77_t0['curve-to']['bind'](_r77_t0); - r77_xn$cubicto$1aao = _r77_t0['cubic-to']['bind'](_r77_t0); - r77_xn$putshapes$9Jrj = _r77_t0['put-shapes']['bind'](_r77_t0); - r77_xn$reverselast$3qIs = _r77_t0['reverse-last']['bind'](_r77_t0); - r77_xn$setwidth$9Jrj(r0_WIDTH); - r77_xn$assignunicode$7Hrq('Q'); - r77_xn$putshapes$9Jrj(r0_glyphs['O']['contours']); - r77_xn$startfrom$1aao(r0_MIDDLE, 0); - r77_xn$lineto$5sIl(r0_MIDDLE + r0_STROKE / 2, -r0_CAP * 0.2); - r77_xn$lineto$5sIl(r0_MIDDLE + r0_STROKE / 2 + r0_STROKE, -r0_CAP * 0.2); - r77_xn$lineto$5sIl(r0_MIDDLE + r0_STROKE, 0); - r77_xn$lineto$5sIl(r0_MIDDLE + r0_STROKE * (1 - 0.5 / 3), r0_STROKE * 0.5); - r77_xn$reverselast$3qIs(); - return void 0; - }); - r0_xn$createglyph$7Hrq('H', function _r0_t45() { - var r79_xn$setwidth$9Jrj, r79_xn$assignunicode$7Hrq, r79_xn$startfrom$1aao, r79_xn$lineto$5sIl, r79_xn$curveto$1aao, r79_xn$cubicto$1aao, r79_xn$putshapes$9Jrj, r79_xn$reverselast$3qIs, _r79_t0; - _r79_t0 = this; - r79_xn$setwidth$9Jrj = _r79_t0['set-width']['bind'](_r79_t0); - r79_xn$assignunicode$7Hrq = _r79_t0['assign-unicode']['bind'](_r79_t0); - r79_xn$startfrom$1aao = _r79_t0['start-from']['bind'](_r79_t0); - r79_xn$lineto$5sIl = _r79_t0['line-to']['bind'](_r79_t0); - r79_xn$curveto$1aao = _r79_t0['curve-to']['bind'](_r79_t0); - r79_xn$cubicto$1aao = _r79_t0['cubic-to']['bind'](_r79_t0); - r79_xn$putshapes$9Jrj = _r79_t0['put-shapes']['bind'](_r79_t0); - r79_xn$reverselast$3qIs = _r79_t0['reverse-last']['bind'](_r79_t0); - r79_xn$setwidth$9Jrj(r0_WIDTH); - r79_xn$assignunicode$7Hrq('H'); - r79_xn$putshapes$9Jrj(new r0_Stroke()['start-from'](r0_SB, 0)['set-width'](0, r0_STROKE)['line-to'](r0_SB, r0_CAP)['form-stroke']()); - r79_xn$putshapes$9Jrj(new r0_Stroke()['start-from'](r0_RIGHTSB, 0)['set-width'](r0_STROKE, 0)['line-to'](r0_RIGHTSB, r0_CAP)['form-stroke']()); - r79_xn$putshapes$9Jrj(new r0_Stroke()['start-from'](r0_SB, r0_CAP / 2)['set-width'](r0_HALFSTROKE, r0_HALFSTROKE)['line-to'](r0_RIGHTSB, r0_CAP / 2)['form-stroke']()); - return void 0; - }); - r0_xn$createglyph$7Hrq('L', function _r0_t46() { - var r81_xn$setwidth$9Jrj, r81_xn$assignunicode$7Hrq, r81_xn$startfrom$1aao, r81_xn$lineto$5sIl, r81_xn$curveto$1aao, r81_xn$cubicto$1aao, r81_xn$putshapes$9Jrj, r81_xn$reverselast$3qIs, _r81_t0; - _r81_t0 = this; - r81_xn$setwidth$9Jrj = _r81_t0['set-width']['bind'](_r81_t0); - r81_xn$assignunicode$7Hrq = _r81_t0['assign-unicode']['bind'](_r81_t0); - r81_xn$startfrom$1aao = _r81_t0['start-from']['bind'](_r81_t0); - r81_xn$lineto$5sIl = _r81_t0['line-to']['bind'](_r81_t0); - r81_xn$curveto$1aao = _r81_t0['curve-to']['bind'](_r81_t0); - r81_xn$cubicto$1aao = _r81_t0['cubic-to']['bind'](_r81_t0); - r81_xn$putshapes$9Jrj = _r81_t0['put-shapes']['bind'](_r81_t0); - r81_xn$reverselast$3qIs = _r81_t0['reverse-last']['bind'](_r81_t0); - r81_xn$setwidth$9Jrj(r0_WIDTH); - r81_xn$assignunicode$7Hrq('L'); - r81_xn$putshapes$9Jrj(new r0_Stroke()['start-from'](r0_SB * 1.5, r0_CAP)['line-to'](r0_SB * 1.5, 0)['form-stroke'](r0_STROKE, 0)); - r81_xn$putshapes$9Jrj(new r0_Stroke()['start-from'](r0_SB * 1.5, 0)['line-to'](r0_RIGHTSB, 0)['form-stroke'](r0_STROKE, 0)); - return void 0; - }); - r0_xn$createglyph$7Hrq('S', function _r0_t47() { - var r83_xn$setwidth$9Jrj, r83_xn$assignunicode$7Hrq, r83_xn$startfrom$1aao, r83_xn$lineto$5sIl, r83_xn$curveto$1aao, r83_xn$cubicto$1aao, r83_xn$putshapes$9Jrj, r83_xn$reverselast$3qIs, r83_slope, r83_bowltop, r83_strokemiddle, r83_bowlbottom, _r83_t0; - _r83_t0 = this; - r83_xn$setwidth$9Jrj = _r83_t0['set-width']['bind'](_r83_t0); - r83_xn$assignunicode$7Hrq = _r83_t0['assign-unicode']['bind'](_r83_t0); - r83_xn$startfrom$1aao = _r83_t0['start-from']['bind'](_r83_t0); - r83_xn$lineto$5sIl = _r83_t0['line-to']['bind'](_r83_t0); - r83_xn$curveto$1aao = _r83_t0['curve-to']['bind'](_r83_t0); - r83_xn$cubicto$1aao = _r83_t0['cubic-to']['bind'](_r83_t0); - r83_xn$putshapes$9Jrj = _r83_t0['put-shapes']['bind'](_r83_t0); - r83_xn$reverselast$3qIs = _r83_t0['reverse-last']['bind'](_r83_t0); - r83_xn$setwidth$9Jrj(r0_WIDTH); - r83_xn$assignunicode$7Hrq('S'); - r83_slope = 0.11; - r83_bowltop = new r0_Stroke(); - r83_bowltop['start-from'](r0_RIGHTSB - r0_SB * 0.1, r0_CAP - r0_HOOK)['set-width'](r0_STROKE, 0)['curve-to'](r0_MIDDLE + r0_KAPPA_HOOK * (r0_MIDDLE - r0_para['sb']), r0_CAPO, r0_MIDDLE, r0_CAPO)['cubic-to'](r0_SB + (1 - r0_BKAPPA) * (r0_WIDTH / 2 - r0_SB), r0_CAPO, r0_SB, r0_CAP - r0_COBKAPPA * r0_SMOOTH, r0_SB, r0_CAP_SMOOTH); - r83_strokemiddle = new r0_Stroke(); - r83_strokemiddle['start-from'](r0_SB + r0_STROKE / 2, r0_CAP_SMOOTH)['set-width'](r0_STROKE / 2, r0_STROKE / 2)['curve-to'](r0_SB + r0_STROKE / 2, (0.5 + r83_slope) * r0_CAP + 2 * r83_slope * r0_CAP / (0.4 * r0_WIDTH) * (0.3 * r0_WIDTH - r0_SB - r0_STROKE / 2), 0.3 * r0_WIDTH, (0.5 + r83_slope) * r0_CAP)['line-to'](0.7 * r0_WIDTH, (0.5 - r83_slope) * r0_CAP)['curve-to'](r0_RIGHTSB - r0_STROKE / 2, (0.5 - r83_slope) * r0_CAP - 2 * r83_slope * r0_CAP / (0.4 * r0_WIDTH) * (0.3 * r0_WIDTH - r0_SB - r0_STROKE / 2), r0_RIGHTSB - r0_STROKE / 2, r0_SMOOTH); - r83_bowlbottom = new r0_Stroke(); - r83_bowlbottom['start-from'](r0_RIGHTSB, r0_SMOOTH)['set-width'](0, r0_STROKE)['cubic-to'](r0_RIGHTSB, r0_COBKAPPA * r0_SMOOTH, r0_MIDDLE + r0_BKAPPA * (r0_RIGHTSB - r0_MIDDLE), r0_O, r0_MIDDLE, r0_O)['curve-to'](r0_MIDDLE - r0_KAPPA_HOOK * (r0_MIDDLE - r0_para['sb']), r0_O, r0_SB * 1.1, r0_HOOK); - r83_xn$putshapes$9Jrj(r83_bowltop['form-stroke']()); - r83_xn$putshapes$9Jrj(r83_strokemiddle['form-stroke']()); - r83_xn$putshapes$9Jrj(r83_bowlbottom['form-stroke']()); - return void 0; - }); - r0_xn$createglyph$7Hrq('dollar', function _r0_t48() { - var r85_xn$setwidth$9Jrj, r85_xn$assignunicode$7Hrq, r85_xn$startfrom$1aao, r85_xn$lineto$5sIl, r85_xn$curveto$1aao, r85_xn$cubicto$1aao, r85_xn$putshapes$9Jrj, r85_xn$reverselast$3qIs, _r85_t0; - _r85_t0 = this; - r85_xn$setwidth$9Jrj = _r85_t0['set-width']['bind'](_r85_t0); - r85_xn$assignunicode$7Hrq = _r85_t0['assign-unicode']['bind'](_r85_t0); - r85_xn$startfrom$1aao = _r85_t0['start-from']['bind'](_r85_t0); - r85_xn$lineto$5sIl = _r85_t0['line-to']['bind'](_r85_t0); - r85_xn$curveto$1aao = _r85_t0['curve-to']['bind'](_r85_t0); - r85_xn$cubicto$1aao = _r85_t0['cubic-to']['bind'](_r85_t0); - r85_xn$putshapes$9Jrj = _r85_t0['put-shapes']['bind'](_r85_t0); - r85_xn$reverselast$3qIs = _r85_t0['reverse-last']['bind'](_r85_t0); - r85_xn$setwidth$9Jrj(r0_WIDTH); - r85_xn$assignunicode$7Hrq('$'); - r85_xn$putshapes$9Jrj(r0_glyphs['S']['contours']); - r85_xn$putshapes$9Jrj(new r0_Stroke()['start-from'](r0_MIDDLE, r0_CAP)['set-width'](r0_HALFSTROKE, r0_HALFSTROKE)['line-to'](r0_MIDDLE, r0_CAP - r0_DESCENDER / 2)['form-stroke']()); - r85_xn$putshapes$9Jrj(new r0_Stroke()['start-from'](r0_MIDDLE, r0_DESCENDER / 2)['set-width'](r0_HALFSTROKE, r0_HALFSTROKE)['line-to'](r0_MIDDLE, 0)['form-stroke']()); + r69_xn$assignunicode$7Hrq('x'); + r69_TURN = r0_XH * 0.1; + r69_barone = new r0_Stroke()['start-from'](r0_SB + r0_HALFSTROKE, 0)['set-width'](r0_HALFSTROKE, r0_HALFSTROKE)['cubic-to'](r0_SB + r0_HALFSTROKE, r69_TURN + 0.17 * (r0_XH - r69_TURN), r0_RIGHTSB - r0_HALFSTROKE, r0_XH - r69_TURN - 0.17 * (r0_XH - r69_TURN), r0_RIGHTSB - r0_HALFSTROKE, r0_XH)['form-stroke'](); + r69_bartwo = [r69_barone[0]['map'](function _r69_t1(r70_pt) { + var r70_pt; + return { + 'x': r0_WIDTH - r70_pt['x'], + 'y': r70_pt['y'], + 'onCurve': r70_pt['onCurve'], + 'cubic': r70_pt['cubic'] + }; + })['reverse']()]; + r69_xn$putshapes$9Jrj(r69_barone); + r69_xn$putshapes$9Jrj(r69_bartwo); return void 0; }); exports['font'] = r0_font; diff --git a/font.patel b/font.patel index 09d691b..e21d758 100644 --- a/font.patel +++ b/font.patel @@ -1,14 +1,15 @@ define font [require './empty.json'] -define bezierCubic2Q2 [require 'node-sfnt/lib/math/bezierCubic2Q2'] define glyphList font.glyf define glyphs (.'.notdef' glyphList.0) -define Bezier [require 'bezier-js'] -define Smooth [require './smooth.js'].Smooth -define intersection [require './intersection.js'].intersection + + +define Glyph [require './support/glyph'].Glyph +define Stroke [require './support/stroke'].Stroke define para ( .width 500 .stroke 85 + .dotsize 100 .sb 50 .cap 771 .xheight 572 @@ -17,230 +18,46 @@ define para ( .smallsmooth 242 .o [-8] .descender [-178] + .kappa 0.51 ) -define TINY 0.0001 -define LITTLE 0.01 +define variantSelector ( + .zero 'slashed' +) +# metrics define DESCENDER para.descender -define O para.o define WIDTH para.width -define STROKE para.stroke -define HALFSTROKE : STROKE / 2 -define SB para.sb define CAP para.cap define XH para.xheight -define XO : XH - O +define O para.o +define SB para.sb define HOOK para.hook define SMOOTH para.smooth define SMALLSMOOTH para.smallsmooth +define STROKE para.stroke +define DOTSIZE para.dotsize + + +# derived metrics +define XO : XH - O +define CAPO : CAP - O +define HALFSTROKE : STROKE / 2 define RIGHTSB : WIDTH - SB -define CAP_SMOOTH : CAP - SMOOTH define MIDDLE : WIDTH / 2 -define KAPPA 0.51 +define CAPMIDDLE : CAP / 2 +define CAP_SMOOTH : CAP - SMOOTH +define DOTRADIUS : para.dotsize / 2 + +# style parameters +define KAPPA para.kappa define COKAPPA : 1 - KAPPA define COBKAPPA : COKAPPA - 0.1 define BKAPPA : KAPPA + 0.1 -define CAPMIDDLE : CAP / 2 -define CAPO : CAP - O -define ESS : STROKE * 0.5 -define SAMPLES 4 define KAPPA_HOOK 0.7 -define [Glyph name] : begin { - set this.name name - set this.unicode () - set this.contours () - set this.advanceWidth 500 - return nothing -} -define [Glyph.prototype.set-width w] : begin { - this.advanceWidth = w - return this -} -define [Glyph.prototype.assign-unicode u] : begin { - this.unicode.push [u.charCodeAt 0] - return this -} -define [Glyph.prototype.start-from x y] : begin { - this.contours.push ((.x x .y y .onCurve true)) - return this -} -define [Glyph.prototype.line-to x y] : begin { - this.contours`[this.contours.length - 1].push (.x x .y y .onCurve true) - return this -} -define [Glyph.prototype.curve-to xc yc x y] : begin { - this.contours`[this.contours.length - 1].push (.x xc .y yc .onCurve false) (.x x .y y .onCurve true) - return this -} -define [Glyph.prototype.cubic-to x1 y1 x2 y2 x y] : begin { - local lastContour this.contours`[this.contours.length - 1] - local lastPoint lastContour`[lastContour.length - 1] - local segments [bezierCubic2Q2 lastPoint (.x x1 .y y1) (.x x2 .y y2) (.x x .y y)] - foreach (p0 (.x xc .y yc) (.x xf .y yf)) [items-of segments] : this.curve-to xc yc xf yf - return this -} -define [Glyph.prototype.reverse-last] : begin { - this.contours.[this.contours.length - 1] = [this.contours.[this.contours.length - 1].reverse] -} -define [Glyph.prototype.put-shapes contours] : begin { - foreach contour [items-of contours] : begin { - this.start-from contour.0.x contour.0.y - for [local j 1] [j < contour.length] [inc j] : begin { - local point contour`j - if point.cubic [begin { - local p2 contour`[j + 1] - local p3 contour`[j + 2] - this.cubic-to point.x point.y p2.x p2.y p3.x p3.y - j = j + 2 - }] [if point.onCurve [this.line-to point.x point.y] [begin { - local p2 contour`[j + 1] - this.curve-to point.x point.y p2.x p2.y - j = j + 1 - }]] - } - } - return this -} - -define [Stroke] : begin { - this.points = () - return this -} -define [Stroke.prototype.set-width d1 d2] : begin { - local point this.points`[this.points.length - 1] - point.d1 = d1 - point.d2 = d2 - return this -} -define [Stroke.prototype.start-from x y] : begin { - this.points = ((.x x .y y .onCurve true)) - return this -} -define [Stroke.prototype.line-to x y] : begin { - this.points.push (.x x .y y .onCurve true) - return this -} -define [Stroke.prototype.curve-to xc yc x y] : begin { - this.points.push (.x xc .y yc .onCurve false) (.x x .y y .onCurve true) - return this -} -define [Stroke.prototype.cubic-to x1 y1 x2 y2 x y] : begin { - this.points.push (.x x1 .y y1 .onCurve false .cubic true) (.x x2 .y y2 .onCurve false .cubic true) (.x x .y y .onCurve true) - return this -} -define [Stroke.prototype.arc-vh-to x y] : begin { - local last this.points`[this.points.length - 1] - this.cubic-to last.x [last.y + BKAPPA * [y - last.y]] [x + BKAPPA * [last.x - x]] y x y - return this -} -define [Stroke.prototype.arc-hv-to x y] : begin { - local last this.points`[this.points.length - 1] - this.cubic-to [last.x + BKAPPA * [x - last.x]] last.y x [y + BKAPPA * [last.y - y]] x y - return this -} -define [dforward p0 p1 p2 p3] ( - .x [p0.x + [[-11] / 6 * p0.x + 3 * p1.x - 3 / 2 * p2.x + p3.x / 3] / TINY * LITTLE] - .y [p0.y + [[-11] / 6 * p0.y + 3 * p1.y - 3 / 2 * p2.y + p3.y / 3] / TINY * LITTLE] -) -define [dbackward p0 p1 p2 p3] ( - .x [p0.x + [11 / 6 * p0.x - 3 * p1.x + 3 / 2 * p2.x - p3.x / 3] / TINY * LITTLE] - .y [p0.y + [11 / 6 * p0.y - 3 * p1.y + 3 / 2 * p2.y - p3.y / 3] / TINY * LITTLE] -) -define [nonlinear a b c] : [Math.abs [[c.y - a.y] * [b.x - a.x] - [c.x - a.x] * [b.y - a.y]]] > TINY - -define [Stroke.prototype.form-stroke d1 d2] : begin { - local d1s ([set d1 [if [this.points.0.d1 >= 0] this.points.0.d1 d1]]) - local d2s ([set d2 [if [this.points.0.d2 >= 0] this.points.0.d2 d2]]) - local subSegments () - local p0 this.points.0 - for [local j 1] [j < this.points.length] [inc j] : begin { - local p1 this.points`j - piecewise { - p1.onCurve : begin { - subSegments.push (p0 (.x [[p0.x + p1.x] / 2] .y [[p0.y + p1.y] / 2]) p1) - d1s.push : set d1 [if [p1.d1 >= 0] p1.d1 d1] - d2s.push : set d2 [if [p1.d2 >= 0] p1.d2 d2] - p0 = p1 - } - p1.cubic : begin { - local p2 this.points`[j + 1] - local p3 this.points`[j + 2] - d1s.push : set d1 [if [p3.d1 >= 0] p3.d1 d1] - d2s.push : set d2 [if [p3.d2 >= 0] p3.d2 d2] - subSegments.push (p0 p1 p2 p3) - p0 = p3 - j = j + 2 - } - true : begin { - local p2 this.points`[j + 1] - d1s.push : set d1 [if [p2.d1 >= 0] p2.d1 d1] - d2s.push : set d2 [if [p2.d2 >= 0] p2.d2 d2] - subSegments.push (p0 p1 p2) - p0 = p2 - j = j + 1 - } - } - } - local f1 : Smooth d1s (.method 'cubic') - local f2 : Smooth d2s (.method 'cubic') - local left () - local right () - for [local j 0] [j < subSegments.length] [inc j] : begin { - local seg subSegments`j - local curve : if [seg.length > 3] [new Bezier seg.0.x seg.0.y seg.1.x seg.1.y seg.2.x seg.2.y seg.3.x seg.3.y] [new Bezier seg.0.x seg.0.y seg.1.x seg.1.y seg.2.x seg.2.y] - foreach sample [range 0 SAMPLES] : begin { - local t : j + sample / SAMPLES - local tn : j + [sample + 1] / SAMPLES - - local lthis : curve.offset [sample / SAMPLES] [f1 t] - local rthis : curve.offset [sample / SAMPLES] [-[f2 t]] - - local lnext : curve.offset [[sample + 1] / SAMPLES] [f1 tn] - local rnext : curve.offset [[sample + 1] / SAMPLES] [-[f2 tn]] - - local lnthis1 : curve.offset [sample / SAMPLES + TINY] [f1 [t + TINY]] - local rnthis1 : curve.offset [sample / SAMPLES + TINY] [-[f2 [t + TINY]]] - local lnnext1 : curve.offset [[sample + 1] / SAMPLES - TINY] [f1 [tn - TINY]] - local rnnext1 : curve.offset [[sample + 1] / SAMPLES - TINY] [-[f2 [tn - TINY]]] - local lnthis2 : curve.offset [sample / SAMPLES + [TINY * 2]] [f1 [t + [TINY * 2]]] - local rnthis2 : curve.offset [sample / SAMPLES + [TINY * 2]] [-[f2 [t + [TINY * 2]]]] - local lnnext2 : curve.offset [[sample + 1] / SAMPLES - [TINY * 2]] [f1 [tn - [TINY * 2]]] - local rnnext2 : curve.offset [[sample + 1] / SAMPLES - [TINY * 2]] [-[f2 [tn - [TINY * 2]]]] - local lnthis3 : curve.offset [sample / SAMPLES + [TINY * 3]] [f1 [t + [TINY * 3]]] - local rnthis3 : curve.offset [sample / SAMPLES + [TINY * 3]] [-[f2 [t + [TINY * 3]]]] - local lnnext3 : curve.offset [[sample + 1] / SAMPLES - [TINY * 3]] [f1 [tn - [TINY * 3]]] - local rnnext3 : curve.offset [[sample + 1] / SAMPLES - [TINY * 3]] [-[f2 [tn - [TINY * 3]]]] - - local dlthis [dforward lthis lnthis1 lnthis2 lnthis3] - local drthis [dforward rthis rnthis1 rnthis2 rnthis3] - local dlnext [dbackward lnext lnnext1 lnnext2 lnnext3] - local drnext [dbackward rnext rnnext2 rnnext2 rnnext3] - - local il : intersection lthis.x lthis.y dlthis.x dlthis.y lnext.x lnext.y dlnext.x dlnext.y - local ir : intersection rthis.x rthis.y drthis.x drthis.y rnext.x rnext.y drnext.x drnext.y - - if [[il.x != null] && [il.y != null] && [nonlinear lthis il lnext]] [then { - left.push (.x lthis.x .y lthis.y .onCurve true) (.x il.x .y il.y .onCurve false) - }] [else { - left.push (.x lthis.x .y lthis.y .onCurve true) - }] - - if [[ir.x != null] && [ir.y != null] && [nonlinear rthis ir rnext]] [then { - right.push (.x rthis.x .y rthis.y .onCurve true) (.x ir.x .y ir.y .onCurve false) - }] [else { - right.push (.x rthis.x .y rthis.y .onCurve true) - }] - } - } - left.push [begin [local last [curve.offset 1 [f1 t]]] (.x last.x .y last.y .onCurve true)] - right.push [begin [local last [curve.offset 1 [-[f2 t]]]] (.x last.x .y last.y .onCurve true)] - - local shape : left.concat [right.reverse] :.map [[p] -> (.x p.x .y p.y .onCurve p.onCurve)] - return (shape) -} +Stroke.bindParameters para define [Ring u d l r] : begin { local my [[u + d] / 2] @@ -278,6 +95,7 @@ define-macro glyph-construction : syntax-rules { local cubic-to : this.cubic-to.bind this local put-shapes : this.put-shapes.bind this local reverse-last : this.reverse-last.bind this + local include-glyph : this.include-glyph.bind this begin @::[steps.map formOf] return nothing }]] env) @@ -306,6 +124,7 @@ create-glyph 'bar' : glyph-construction { :.form-stroke } +### A X Y : Capital letters with curly stands create-glyph 'A' : glyph-construction { set-width WIDTH assign-unicode 'A' @@ -380,24 +199,8 @@ create-glyph 'Y' : glyph-construction { put-shapes bartwo put-shapes : new Stroke :.start-from MIDDLE 0 :.set-width HALFSTROKE HALFSTROKE :.line-to MIDDLE [cross + HALFSTROKE] :.form-stroke } -create-glyph 'x' : glyph-construction { - set-width WIDTH - assign-unicode 'x' - - local TURN [XH * 0.1] - - local barone : new Stroke - :.start-from [SB + HALFSTROKE] 0 - :.set-width HALFSTROKE HALFSTROKE - :.cubic-to [SB + HALFSTROKE] [TURN + 0.17 * [XH - TURN]] [RIGHTSB - HALFSTROKE] [XH - TURN - 0.17 * [XH - TURN]] [RIGHTSB - HALFSTROKE] XH - :.form-stroke - - local bartwo : list : barone.0.map [[pt] -> (.x [WIDTH - pt.x] .y pt.y .onCurve pt.onCurve .cubic pt.cubic)] :.reverse - - put-shapes barone - put-shapes bartwo -} +### B D P R create-glyph 'B' : glyph-construction { set-width WIDTH assign-unicode 'B' @@ -430,19 +233,6 @@ create-glyph 'B' : glyph-construction { put-shapes : leftbar.form-stroke 0 STROKE } -create-glyph 'C' : glyph-construction { - set-width WIDTH - assign-unicode 'C' - local outline : new Stroke - outline.start-from [RIGHTSB - SB * 0.1] [CAP - HOOK] - :.curve-to [MIDDLE + KAPPA_HOOK * [MIDDLE - para.sb]] CAPO MIDDLE CAPO - :.cubic-to [SB + [1 - BKAPPA] * [WIDTH / 2 - SB]] CAPO SB [CAP - COBKAPPA * SMOOTH] SB CAP_SMOOTH - :.line-to SB SMOOTH - :.cubic-to SB [COBKAPPA * SMOOTH] [SB + [1 - BKAPPA] * [WIDTH / 2 - SB]] O [WIDTH / 2] O - :.curve-to [MIDDLE + KAPPA_HOOK * [MIDDLE - SB]] O [RIGHTSB - SB * 0.1] HOOK - put-shapes : outline.form-stroke STROKE 0 -} - create-glyph 'D' : glyph-construction { set-width WIDTH assign-unicode 'D' @@ -464,6 +254,56 @@ create-glyph 'D' : glyph-construction { put-shapes : bowl.form-stroke STROKE 0 put-shapes : leftbar.form-stroke 0 STROKE } +create-glyph 'P' : glyph-construction { + set-width WIDTH + assign-unicode 'P' + + local bowl CAPMIDDLE + local bkappa [COKAPPA - 0.2] + + local turntop : [CAP + [bowl - HALFSTROKE]] / 2 + local turnbottom : bowl / 2 + + local topbowl : new Stroke + topbowl.start-from SB CAP + :.line-to [RIGHTSB - turnbottom] CAP + :.cubic-to [RIGHTSB - bkappa * turnbottom] CAP RIGHTSB [turntop + [CAP - turntop] * KAPPA] RIGHTSB turntop + :.cubic-to RIGHTSB [turntop + KAPPA * [bowl - HALFSTROKE - turntop]] [RIGHTSB - bkappa * turnbottom] [bowl - HALFSTROKE] [RIGHTSB - turnbottom] [bowl - HALFSTROKE] + :.line-to SB [bowl - HALFSTROKE] + + local leftbar : new Stroke :.start-from SB 0 :.line-to SB CAP + + put-shapes : topbowl.form-stroke 0 STROKE + put-shapes : leftbar.form-stroke 0 STROKE +} +create-glyph 'R' : glyph-construction { + set-width WIDTH + assign-unicode 'R' + include-glyph glyphs.P + + local TURN [XH * 0.1] + local right [RIGHTSB + O] + put-shapes : new Stroke + :.start-from [right - HALFSTROKE] 0 + :.set-width HALFSTROKE HALFSTROKE + :.curve-to [right - HALFSTROKE] [TURN + 0.1 * [XH - TURN]] MIDDLE CAPMIDDLE + :.form-stroke +} + +### C G O zero Q + +create-glyph 'C' : glyph-construction { + set-width WIDTH + assign-unicode 'C' + local outline : new Stroke + outline.start-from [RIGHTSB - SB * 0.1] [CAP - HOOK] + :.curve-to [MIDDLE + KAPPA_HOOK * [MIDDLE - para.sb]] CAPO MIDDLE CAPO + :.cubic-to [SB + [1 - BKAPPA] * [WIDTH / 2 - SB]] CAPO SB [CAP - COBKAPPA * SMOOTH] SB CAP_SMOOTH + :.line-to SB SMOOTH + :.cubic-to SB [COBKAPPA * SMOOTH] [SB + [1 - BKAPPA] * [WIDTH / 2 - SB]] O [WIDTH / 2] O + :.curve-to [MIDDLE + KAPPA_HOOK * [MIDDLE - SB]] O [RIGHTSB - SB * 0.1] HOOK + put-shapes : outline.form-stroke STROKE 0 +} create-glyph 'G' : glyph-construction { set-width WIDTH @@ -495,6 +335,104 @@ create-glyph 'O' : glyph-construction { :.cubic-to RIGHTSB [CAP - COBKAPPA * SMOOTH] [MIDDLE + BKAPPA * [RIGHTSB - MIDDLE]] CAPO MIDDLE CAPO put-shapes : outline.form-stroke STROKE 0 } + +create-glyph 'zero.slashed' : glyph-construction { + set-width WIDTH + + put-shapes glyphs.O.contours + + local bar : new Stroke :.start-from [SB + STROKE / 2] [CAP * [1 - 0.65]] :.line-to [RIGHTSB - STROKE / 2] [CAP * 0.65] + put-shapes : bar.form-stroke [STROKE / 2] [STROKE / 2] +} +create-glyph 'zero.unslashed' : glyph-construction { + include-glyph glyphs.O +} +create-glyph 'zero.dotted' : glyph-construction { + include-glyph glyphs.O + put-shapes : list { + Ring [CAPMIDDLE + DOTRADIUS] [CAPMIDDLE - DOTRADIUS] [MIDDLE + DOTRADIUS] [MIDDLE - DOTRADIUS] + } +} +create-glyph 'zero' : glyph-construction { + set-width WIDTH + assign-unicode '0' + include-glyph glyphs.[match variantSelector.zero { + 'slashed' 'zero.slashed' + 'dotted' 'zero.dotted' + 'unslahsed' 'zero.unslashed' + otherwise 'zero.slashed' + }] +} + +create-glyph 'Q' : glyph-construction { + set-width WIDTH + assign-unicode 'Q' + + put-shapes glyphs.O.contours + start-from MIDDLE 0 + line-to [MIDDLE + STROKE / 2] [-CAP * 0.2] + line-to [MIDDLE + STROKE / 2 + STROKE] [-CAP * 0.2] + line-to [MIDDLE + STROKE] 0 + line-to [MIDDLE + STROKE * [1 - 0.5 / 3]] [STROKE * 0.5] + reverse-last +} + + +### H L +create-glyph 'H' : glyph-construction { + set-width WIDTH + assign-unicode 'H' + + put-shapes : new Stroke :.start-from SB 0 :.set-width 0 STROKE :.line-to SB CAP :.form-stroke + put-shapes : new Stroke :.start-from RIGHTSB 0 :.set-width STROKE 0 :.line-to RIGHTSB CAP :.form-stroke + put-shapes : new Stroke :.start-from SB [CAP / 2] :.set-width HALFSTROKE HALFSTROKE :.line-to RIGHTSB [CAP / 2] :.form-stroke +} + +create-glyph 'L' : glyph-construction { + set-width WIDTH + assign-unicode 'L' + + put-shapes : new Stroke :.start-from [SB * 1.5] CAP :.line-to [SB * 1.5] 0 :.line-to RIGHTSB 0 :.form-stroke STROKE 0 +} + + +### S +create-glyph 'S' : glyph-construction { + set-width WIDTH; assign-unicode 'S' + + local slope 0.11 + + local bowltop : new Stroke + bowltop.start-from [RIGHTSB - SB * 0.1] [CAP - HOOK] + :.set-width STROKE 0 + :.curve-to [MIDDLE + KAPPA_HOOK * [MIDDLE - para.sb]] CAPO MIDDLE CAPO + :.cubic-to [SB + [1 - BKAPPA] * [WIDTH / 2 - SB]] CAPO SB [CAP - COBKAPPA * SMOOTH] SB CAP_SMOOTH + + local strokemiddle : new Stroke + strokemiddle.start-from [SB + STROKE / 2] CAP_SMOOTH + :.set-width [STROKE / 2] [STROKE / 2] + :.curve-to [SB + STROKE / 2] [[0.5 + slope] * CAP + [2 * slope * CAP] / [0.4 * WIDTH] * [0.3 * WIDTH - SB - STROKE / 2]] [0.3 * WIDTH] [[0.5 + slope] * CAP] + :.line-to [0.7 * WIDTH] [[0.5 - slope] * CAP] + :.curve-to [RIGHTSB - STROKE / 2] [[0.5 - slope] * CAP - [2 * slope * CAP] / [0.4 * WIDTH] * [0.3 * WIDTH - SB - STROKE / 2]] [RIGHTSB - STROKE / 2] SMOOTH + + local bowlbottom : new Stroke + bowlbottom.start-from RIGHTSB SMOOTH :.set-width 0 STROKE + :.cubic-to RIGHTSB [COBKAPPA * SMOOTH] [MIDDLE + BKAPPA * [RIGHTSB - MIDDLE]] O MIDDLE O + :.curve-to [MIDDLE - KAPPA_HOOK * [MIDDLE - para.sb]] O [SB * 1.1] HOOK + + put-shapes : bowltop.form-stroke + put-shapes : strokemiddle.form-stroke + put-shapes : bowlbottom.form-stroke +} +create-glyph 'dollar' : glyph-construction { + set-width WIDTH; assign-unicode '$' + put-shapes glyphs.S.contours + put-shapes : new Stroke :.start-from MIDDLE CAP :.set-width HALFSTROKE HALFSTROKE :.line-to MIDDLE [CAP - DESCENDER / 2] :.form-stroke + put-shapes : new Stroke :.start-from MIDDLE [DESCENDER / 2] :.set-width HALFSTROKE HALFSTROKE :.line-to MIDDLE 0 :.form-stroke +} + + + create-glyph 'o' : glyph-construction { set-width WIDTH assign-unicode 'o' @@ -504,7 +442,6 @@ create-glyph 'o' : glyph-construction { } reverse-last } - create-glyph 'o.left' : glyph-construction { set-width WIDTH # build outline manually @@ -541,6 +478,12 @@ create-glyph 'q' : glyph-construction { put-shapes glyphs.'o.right'.contours put-shapes : new Stroke :.start-from RIGHTSB XH :.set-width 0 STROKE :.line-to RIGHTSB DESCENDER :.form-stroke } +create-glyph 'd' : glyph-construction { + set-width WIDTH + assign-unicode 'd' + put-shapes glyphs.'o.right'.contours + put-shapes : new Stroke :.start-from RIGHTSB 0 :.set-width STROKE 0 :.line-to RIGHTSB CAP :.form-stroke +} create-glyph 'g' : glyph-construction { set-width WIDTH assign-unicode 'g' @@ -569,82 +512,26 @@ create-glyph 'g' : glyph-construction { line-to MIDDLE [XH - STROKE - O] line-to MODDLE XH } -create-glyph 'd' : glyph-construction { + + +create-glyph 'x' : glyph-construction { set-width WIDTH - assign-unicode 'd' - put-shapes glyphs.'o.right'.contours - put-shapes : new Stroke :.start-from RIGHTSB 0 :.set-width STROKE 0 :.line-to RIGHTSB CAP :.form-stroke + assign-unicode 'x' + + local TURN [XH * 0.1] + + local barone : new Stroke + :.start-from [SB + HALFSTROKE] 0 + :.set-width HALFSTROKE HALFSTROKE + :.cubic-to [SB + HALFSTROKE] [TURN + 0.17 * [XH - TURN]] [RIGHTSB - HALFSTROKE] [XH - TURN - 0.17 * [XH - TURN]] [RIGHTSB - HALFSTROKE] XH + :.form-stroke + + local bartwo : list : barone.0.map [[pt] -> (.x [WIDTH - pt.x] .y pt.y .onCurve pt.onCurve .cubic pt.cubic)] :.reverse + + put-shapes barone + put-shapes bartwo } -create-glyph 'zero' : glyph-construction { - set-width WIDTH - assign-unicode '0' - put-shapes glyphs.O.contours - - local bar : new Stroke :.start-from [SB + STROKE / 2] [CAP * [1 - 0.65]] :.line-to [RIGHTSB - STROKE / 2] [CAP * 0.65] - put-shapes : bar.form-stroke [STROKE / 2] [STROKE / 2] -} -create-glyph 'Q' : glyph-construction { - set-width WIDTH - assign-unicode 'Q' - - put-shapes glyphs.O.contours - start-from MIDDLE 0 - line-to [MIDDLE + STROKE / 2] [-CAP * 0.2] - line-to [MIDDLE + STROKE / 2 + STROKE] [-CAP * 0.2] - line-to [MIDDLE + STROKE] 0 - line-to [MIDDLE + STROKE * [1 - 0.5 / 3]] [STROKE * 0.5] - reverse-last -} -create-glyph 'H' : glyph-construction { - set-width WIDTH - assign-unicode 'H' - - put-shapes : new Stroke :.start-from SB 0 :.set-width 0 STROKE :.line-to SB CAP :.form-stroke - put-shapes : new Stroke :.start-from RIGHTSB 0 :.set-width STROKE 0 :.line-to RIGHTSB CAP :.form-stroke - put-shapes : new Stroke :.start-from SB [CAP / 2] :.set-width HALFSTROKE HALFSTROKE :.line-to RIGHTSB [CAP / 2] :.form-stroke -} - -create-glyph 'L' : glyph-construction { - set-width WIDTH - assign-unicode 'L' - - put-shapes : new Stroke :.start-from [SB * 1.5] CAP :.line-to [SB * 1.5] 0 :.form-stroke STROKE 0 - put-shapes : new Stroke :.start-from [SB * 1.5] 0 :.line-to RIGHTSB 0 :.form-stroke STROKE 0 -} -create-glyph 'S' : glyph-construction { - set-width WIDTH; assign-unicode 'S' - - local slope 0.11 - - local bowltop : new Stroke - bowltop.start-from [RIGHTSB - SB * 0.1] [CAP - HOOK] - :.set-width STROKE 0 - :.curve-to [MIDDLE + KAPPA_HOOK * [MIDDLE - para.sb]] CAPO MIDDLE CAPO - :.cubic-to [SB + [1 - BKAPPA] * [WIDTH / 2 - SB]] CAPO SB [CAP - COBKAPPA * SMOOTH] SB CAP_SMOOTH - - local strokemiddle : new Stroke - strokemiddle.start-from [SB + STROKE / 2] CAP_SMOOTH - :.set-width [STROKE / 2] [STROKE / 2] - :.curve-to [SB + STROKE / 2] [[0.5 + slope] * CAP + [2 * slope * CAP] / [0.4 * WIDTH] * [0.3 * WIDTH - SB - STROKE / 2]] [0.3 * WIDTH] [[0.5 + slope] * CAP] - :.line-to [0.7 * WIDTH] [[0.5 - slope] * CAP] - :.curve-to [RIGHTSB - STROKE / 2] [[0.5 - slope] * CAP - [2 * slope * CAP] / [0.4 * WIDTH] * [0.3 * WIDTH - SB - STROKE / 2]] [RIGHTSB - STROKE / 2] SMOOTH - - local bowlbottom : new Stroke - bowlbottom.start-from RIGHTSB SMOOTH :.set-width 0 STROKE - :.cubic-to RIGHTSB [COBKAPPA * SMOOTH] [MIDDLE + BKAPPA * [RIGHTSB - MIDDLE]] O MIDDLE O - :.curve-to [MIDDLE - KAPPA_HOOK * [MIDDLE - para.sb]] O [SB * 1.1] HOOK - - put-shapes : bowltop.form-stroke - put-shapes : strokemiddle.form-stroke - put-shapes : bowlbottom.form-stroke -} -create-glyph 'dollar' : glyph-construction { - set-width WIDTH; assign-unicode '$' - put-shapes glyphs.S.contours - put-shapes : new Stroke :.start-from MIDDLE CAP :.set-width HALFSTROKE HALFSTROKE :.line-to MIDDLE [CAP - DESCENDER / 2] :.form-stroke - put-shapes : new Stroke :.start-from MIDDLE [DESCENDER / 2] :.set-width HALFSTROKE HALFSTROKE :.line-to MIDDLE 0 :.form-stroke -} exports.font = font \ No newline at end of file diff --git a/makefile b/makefile index f8073c8..f35456b 100644 --- a/makefile +++ b/makefile @@ -1,8 +1,10 @@ -JSFILES = font.js +JSFILES = font.js support/glyph.js support/stroke.js all : $(JSFILES) $(JSFILES) : patel-c $< -o $@ -font.js : font.patel \ No newline at end of file +font.js : font.patel +support/glyph.js : support/glyph.patel +support/stroke.js : support/stroke.patel \ No newline at end of file diff --git a/support/glyph.js b/support/glyph.js new file mode 100644 index 0000000..2b2346e --- /dev/null +++ b/support/glyph.js @@ -0,0 +1,129 @@ +{ + var r0_bezierCubic2Q2, r0_Glyph, _r0_t0, _r0_t1, _r0_t2, _r0_t3, _r0_t4, _r0_t5, _r0_t6, _r0_t7, _r0_t8, _r0_t9; + r0_bezierCubic2Q2 = require('node-sfnt/lib/math/bezierCubic2Q2'); + r0_Glyph = function _r0_t0(r1_name) { + var r1_name, _r1_t0; + _r1_t0 = this; + _r1_t0['name'] = r1_name; + _r1_t0['unicode'] = []; + _r1_t0['contours'] = []; + _r1_t0['advanceWidth'] = 500; + return void 0; + }; + r0_Glyph['prototype']['set-width'] = function _r0_t1(r2_w) { + var r2_w, _r2_t0; + _r2_t0 = this; + _r2_t0['advanceWidth'] = r2_w; + return _r2_t0; + }; + r0_Glyph['prototype']['assign-unicode'] = function _r0_t2(r3_u) { + var r3_u, _r3_t0; + _r3_t0 = this; + _r3_t0['unicode']['push'](r3_u['charCodeAt'](0)); + return _r3_t0; + }; + r0_Glyph['prototype']['start-from'] = function _r0_t3(r4_x, r4_y) { + var r4_x, r4_y, _r4_t0; + _r4_t0 = this; + _r4_t0['contours']['push']([{ + 'x': r4_x, + 'y': r4_y, + 'onCurve': true + }]); + return _r4_t0; + }; + r0_Glyph['prototype']['line-to'] = function _r0_t4(r5_x, r5_y) { + var r5_x, r5_y, _r5_t0; + _r5_t0 = this; + _r5_t0['contours'][_r5_t0['contours']['length'] - 1]['push']({ + 'x': r5_x, + 'y': r5_y, + 'onCurve': true + }); + return _r5_t0; + }; + r0_Glyph['prototype']['curve-to'] = function _r0_t5(r6_xc, r6_yc, r6_x, r6_y) { + var r6_xc, r6_yc, r6_x, r6_y, _r6_t0; + _r6_t0 = this; + _r6_t0['contours'][_r6_t0['contours']['length'] - 1]['push']({ + 'x': r6_xc, + 'y': r6_yc, + 'onCurve': false + }, { + 'x': r6_x, + 'y': r6_y, + 'onCurve': true + }); + return _r6_t0; + }; + r0_Glyph['prototype']['cubic-to'] = function _r0_t6(r7_x1, r7_y1, r7_x2, r7_y2, r7_x, r7_y) { + var r7_x1, r7_y1, r7_x2, r7_y2, r7_x, r7_y, r7_lastContour, r7_lastPoint, r7_segments, r7_p0, r7_xc, r7_yc, r7_xf, r7_yf, _r7_t0, _r7_t1, _r7_t2, _r7_t3, _r7_t4, _r7_t5, _r7_t6; + _r7_t6 = this; + r7_lastContour = _r7_t6['contours'][_r7_t6['contours']['length'] - 1]; + r7_lastPoint = r7_lastContour[r7_lastContour['length'] - 1]; + r7_segments = r0_bezierCubic2Q2(r7_lastPoint, { + 'x': r7_x1, + 'y': r7_y1 + }, { + 'x': r7_x2, + 'y': r7_y2 + }, { + 'x': r7_x, + 'y': r7_y + }); + _r7_t0 = r7_segments; + _r7_t1 = _r7_t0['length']; + _r7_t2 = 0; + for (; _r7_t2 < _r7_t1; _r7_t2 = _r7_t2 + 1) { + _r7_t3 = _r7_t0[_r7_t2]; + r7_p0 = _r7_t3[0]; + _r7_t4 = _r7_t3[1]; + r7_xc = _r7_t4['x']; + r7_yc = _r7_t4['y']; + _r7_t5 = _r7_t3[2]; + r7_xf = _r7_t5['x']; + r7_yf = _r7_t5['y']; + _r7_t6['curve-to'](r7_xc, r7_yc, r7_xf, r7_yf); + } + return _r7_t6; + }; + r0_Glyph['prototype']['reverse-last'] = function _r0_t7() { + var _r9_t0; + _r9_t0 = this; + return _r9_t0['contours'][_r9_t0['contours']['length'] - 1] = _r9_t0['contours'][_r9_t0['contours']['length'] - 1]['reverse'](); + }; + r0_Glyph['prototype']['put-shapes'] = function _r0_t8(r10_contours) { + var r10_contours, r10_contour, r10_j, r10_point, r10_p2, r10_p3, _r10_t0, _r10_t1, _r10_t2, _r10_t3; + _r10_t3 = this; + _r10_t0 = r10_contours; + _r10_t1 = _r10_t0['length']; + _r10_t2 = 0; + for (; _r10_t2 < _r10_t1; _r10_t2 = _r10_t2 + 1) { + r10_contour = _r10_t0[_r10_t2]; + _r10_t3['start-from'](r10_contour[0]['x'], r10_contour[0]['y']); + r10_j = 1; + for (; r10_j < r10_contour['length']; r10_j = r10_j + 1) { + r10_point = r10_contour[r10_j]; + if (r10_point['cubic']) { + r10_p2 = r10_contour[r10_j + 1]; + r10_p3 = r10_contour[r10_j + 2]; + _r10_t3['cubic-to'](r10_point['x'], r10_point['y'], r10_p2['x'], r10_p2['y'], r10_p3['x'], r10_p3['y']); + r10_j = r10_j + 2; + } else if (r10_point['onCurve']) + _r10_t3['line-to'](r10_point['x'], r10_point['y']); + else { + r10_p2 = r10_contour[r10_j + 1]; + _r10_t3['curve-to'](r10_point['x'], r10_point['y'], r10_p2['x'], r10_p2['y']); + r10_j = r10_j + 1; + } + } + } + return _r10_t3; + }; + r0_Glyph['prototype']['include-glyph'] = function _r0_t9(r12_glyph) { + var r12_glyph, _r12_t0; + _r12_t0 = this; + return _r12_t0['put-shapes'](r12_glyph['contours']); + }; + exports['Glyph'] = r0_Glyph; +} diff --git a/support/glyph.patel b/support/glyph.patel new file mode 100644 index 0000000..b50cfe4 --- /dev/null +++ b/support/glyph.patel @@ -0,0 +1,61 @@ +define bezierCubic2Q2 [require 'node-sfnt/lib/math/bezierCubic2Q2'] +define [Glyph name] : begin { + set this.name name + set this.unicode () + set this.contours () + set this.advanceWidth 500 + return nothing +} +define [Glyph.prototype.set-width w] : begin { + this.advanceWidth = w + return this +} +define [Glyph.prototype.assign-unicode u] : begin { + this.unicode.push [u.charCodeAt 0] + return this +} + +define [Glyph.prototype.start-from x y] : begin { + this.contours.push ((.x x .y y .onCurve true)) + return this +} +define [Glyph.prototype.line-to x y] : begin { + this.contours`[this.contours.length - 1].push (.x x .y y .onCurve true) + return this +} +define [Glyph.prototype.curve-to xc yc x y] : begin { + this.contours`[this.contours.length - 1].push (.x xc .y yc .onCurve false) (.x x .y y .onCurve true) + return this +} +define [Glyph.prototype.cubic-to x1 y1 x2 y2 x y] : begin { + local lastContour this.contours`[this.contours.length - 1] + local lastPoint lastContour`[lastContour.length - 1] + local segments [bezierCubic2Q2 lastPoint (.x x1 .y y1) (.x x2 .y y2) (.x x .y y)] + foreach (p0 (.x xc .y yc) (.x xf .y yf)) [items-of segments] : this.curve-to xc yc xf yf + return this +} +define [Glyph.prototype.reverse-last] : begin { + this.contours.[this.contours.length - 1] = [this.contours.[this.contours.length - 1].reverse] +} +define [Glyph.prototype.put-shapes contours] : begin { + foreach contour [items-of contours] : begin { + this.start-from contour.0.x contour.0.y + for [local j 1] [j < contour.length] [inc j] : begin { + local point contour`j + if point.cubic [begin { + local p2 contour`[j + 1] + local p3 contour`[j + 2] + this.cubic-to point.x point.y p2.x p2.y p3.x p3.y + j = j + 2 + }] [if point.onCurve [this.line-to point.x point.y] [begin { + local p2 contour`[j + 1] + this.curve-to point.x point.y p2.x p2.y + j = j + 1 + }]] + } + } + return this +} +define [Glyph.prototype.include-glyph glyph] : this.put-shapes glyph.contours + +exports.Glyph = Glyph \ No newline at end of file diff --git a/intersection.js b/support/intersection.js similarity index 100% rename from intersection.js rename to support/intersection.js diff --git a/smooth.js b/support/smooth.js similarity index 100% rename from smooth.js rename to support/smooth.js diff --git a/support/stroke.js b/support/stroke.js new file mode 100644 index 0000000..75f0ceb --- /dev/null +++ b/support/stroke.js @@ -0,0 +1,326 @@ +{ + var r0_Smooth, r0_intersection, r0_Bezier, r0_SAMPLES, r0_TINY, r0_LITTLE, r0_KAPPA, r0_COKAPPA, r0_BKAPPA, r0_COBKAPPA, r0_Stroke, r0_dforward, r0_dbackward, r0_nonlinear, _r0_t0, _r0_t1, _r0_t2, _r0_t3, _r0_t4, _r0_t5, _r0_t6, _r0_t7, _r0_t8, _r0_t9, _r0_t10, _r0_t11, _r0_t12; + r0_Smooth = require('./smooth')['Smooth']; + r0_intersection = require('./intersection')['intersection']; + r0_Bezier = require('bezier-js'); + r0_SAMPLES = 4; + r0_TINY = 0.0001; + r0_LITTLE = 0.01; + r0_KAPPA = 0.51; + r0_COKAPPA = 1 - r0_KAPPA; + r0_BKAPPA = r0_KAPPA + 0.1; + r0_COBKAPPA = r0_COKAPPA - 0.1; + r0_Stroke = function _r0_t0() { + var _r1_t0; + _r1_t0 = this; + _r1_t0['points'] = []; + return _r1_t0; + }; + r0_Stroke['bindParameters'] = function _r0_t1(r2_para) { + var r2_para; + r0_KAPPA = r2_para['kappa']; + r0_COKAPPA = 1 - r0_KAPPA; + r0_COBKAPPA = r0_COKAPPA - 0.1; + return r0_BKAPPA = r0_KAPPA + 0.1; + }; + r0_Stroke['prototype']['set-width'] = function _r0_t2(r3_d1, r3_d2) { + var r3_d1, r3_d2, r3_point, _r3_t0; + _r3_t0 = this; + r3_point = _r3_t0['points'][_r3_t0['points']['length'] - 1]; + r3_point['d1'] = r3_d1; + r3_point['d2'] = r3_d2; + return _r3_t0; + }; + r0_Stroke['prototype']['start-from'] = function _r0_t3(r4_x, r4_y) { + var r4_x, r4_y, _r4_t0; + _r4_t0 = this; + _r4_t0['points'] = [{ + 'x': r4_x, + 'y': r4_y, + 'onCurve': true + }]; + return _r4_t0; + }; + r0_Stroke['prototype']['line-to'] = function _r0_t4(r5_x, r5_y) { + var r5_x, r5_y, _r5_t0; + _r5_t0 = this; + _r5_t0['points']['push']({ + 'x': r5_x, + 'y': r5_y, + 'onCurve': true + }); + return _r5_t0; + }; + r0_Stroke['prototype']['curve-to'] = function _r0_t5(r6_xc, r6_yc, r6_x, r6_y) { + var r6_xc, r6_yc, r6_x, r6_y, _r6_t0; + _r6_t0 = this; + _r6_t0['points']['push']({ + 'x': r6_xc, + 'y': r6_yc, + 'onCurve': false + }, { + 'x': r6_x, + 'y': r6_y, + 'onCurve': true + }); + return _r6_t0; + }; + r0_Stroke['prototype']['cubic-to'] = function _r0_t6(r7_x1, r7_y1, r7_x2, r7_y2, r7_x, r7_y) { + var r7_x1, r7_y1, r7_x2, r7_y2, r7_x, r7_y, _r7_t0; + _r7_t0 = this; + _r7_t0['points']['push']({ + 'x': r7_x1, + 'y': r7_y1, + 'onCurve': false, + 'cubic': true + }, { + 'x': r7_x2, + 'y': r7_y2, + 'onCurve': false, + 'cubic': true + }, { + 'x': r7_x, + 'y': r7_y, + 'onCurve': true + }); + return _r7_t0; + }; + r0_Stroke['prototype']['arc-vh-to'] = function _r0_t7(r8_x, r8_y) { + var r8_x, r8_y, r8_last, _r8_t0; + _r8_t0 = this; + r8_last = _r8_t0['points'][_r8_t0['points']['length'] - 1]; + _r8_t0['cubic-to'](r8_last['x'], r8_last['y'] + r0_BKAPPA * (r8_y - r8_last['y']), r8_x + r0_BKAPPA * (r8_last['x'] - r8_x), r8_y, r8_x, r8_y); + return _r8_t0; + }; + r0_Stroke['prototype']['arc-hv-to'] = function _r0_t8(r9_x, r9_y) { + var r9_x, r9_y, r9_last, _r9_t0; + _r9_t0 = this; + r9_last = _r9_t0['points'][_r9_t0['points']['length'] - 1]; + _r9_t0['cubic-to'](r9_last['x'] + r0_BKAPPA * (r9_x - r9_last['x']), r9_last['y'], r9_x, r9_y + r0_BKAPPA * (r9_last['y'] - r9_y), r9_x, r9_y); + return _r9_t0; + }; + r0_dforward = function _r0_t9(r10_p0, r10_p1, r10_p2, r10_p3) { + var r10_p0, r10_p1, r10_p2, r10_p3; + return { + 'x': r10_p0['x'] + (-11 / 6 * r10_p0['x'] + 3 * r10_p1['x'] - 3 / 2 * r10_p2['x'] + r10_p3['x'] / 3) / r0_TINY * r0_LITTLE, + 'y': r10_p0['y'] + (-11 / 6 * r10_p0['y'] + 3 * r10_p1['y'] - 3 / 2 * r10_p2['y'] + r10_p3['y'] / 3) / r0_TINY * r0_LITTLE + }; + }; + r0_dbackward = function _r0_t10(r11_p0, r11_p1, r11_p2, r11_p3) { + var r11_p0, r11_p1, r11_p2, r11_p3; + return { + 'x': r11_p0['x'] + (11 / 6 * r11_p0['x'] - 3 * r11_p1['x'] + 3 / 2 * r11_p2['x'] - r11_p3['x'] / 3) / r0_TINY * r0_LITTLE, + 'y': r11_p0['y'] + (11 / 6 * r11_p0['y'] - 3 * r11_p1['y'] + 3 / 2 * r11_p2['y'] - r11_p3['y'] / 3) / r0_TINY * r0_LITTLE + }; + }; + r0_nonlinear = function _r0_t11(r12_a, r12_b, r12_c) { + var r12_a, r12_b, r12_c; + return Math['abs']((r12_c['y'] - r12_a['y']) * (r12_b['x'] - r12_a['x']) - (r12_c['x'] - r12_a['x']) * (r12_b['y'] - r12_a['y'])) > r0_TINY; + }; + r0_Stroke['prototype']['form-stroke'] = function _r0_t12(r13_d1, r13_d2) { + var r13_d1, r13_d2, r13_d1s, r13_d2s, r13_subSegments, r13_p0, r13_j, r13_p1, r13_p2, r13_p3, r13_f1, r13_f2, r13_left, r13_right, r13_seg, r13_curve, r13_sample, r13_t, r13_tn, r13_lthis, r13_rthis, r13_lnext, r13_rnext, r13_lnthis1, r13_rnthis1, r13_lnnext1, r13_rnnext1, r13_lnthis2, r13_rnthis2, r13_lnnext2, r13_rnnext2, r13_lnthis3, r13_rnthis3, r13_lnnext3, r13_rnnext3, r13_dlthis, r13_drthis, r13_dlnext, r13_drnext, r13_il, r13_ir, r13_last, r13_shape, _r13_t0, _r13_t1, _r13_t2, _r13_t3, _r13_t4, _r13_t5, _r13_t6, _r13_t7, _r13_t8, _r13_t9, _r13_t10, _r13_t11, _r13_t12, _r13_t13, _r13_t14, _r13_t15, _r13_t16, _r13_t17, _r13_t18, _r13_t19, _r13_t20, _r13_t21, _r13_t22, _r13_t23, _r13_t24, _r13_t25, _r13_t26, _r13_t27, _r13_t28, _r13_t29, _r13_t30, _r13_t31, _r13_t32, _r13_t33, _r13_t34, _r13_t35, _r13_t36, _r13_t37, _r13_t38; + _r13_t2 = this; + if (_r13_t2['points'][0]['d1'] >= 0) + _r13_t3 = _r13_t2['points'][0]['d1']; + else + _r13_t3 = r13_d1; + _r13_t4 = r13_d1 = _r13_t3; + r13_d1s = [_r13_t4]; + if (_r13_t2['points'][0]['d2'] >= 0) + _r13_t5 = _r13_t2['points'][0]['d2']; + else + _r13_t5 = r13_d2; + _r13_t6 = r13_d2 = _r13_t5; + r13_d2s = [_r13_t6]; + r13_subSegments = []; + r13_p0 = _r13_t2['points'][0]; + r13_j = 1; + for (; r13_j < this['points']['length']; r13_j = r13_j + 1) { + r13_p1 = _r13_t2['points'][r13_j]; + if (r13_p1['onCurve']) { + r13_subSegments['push']([ + r13_p0, + { + 'x': (r13_p0['x'] + r13_p1['x']) / 2, + 'y': (r13_p0['y'] + r13_p1['y']) / 2 + }, + r13_p1 + ]); + _r13_t7 = r13_d1s; + _r13_t8 = _r13_t7['push']; + if (r13_p1['d1'] >= 0) + _r13_t9 = r13_p1['d1']; + else + _r13_t9 = r13_d1; + _r13_t10 = r13_d1 = _r13_t9; + _r13_t8['call'](_r13_t7, _r13_t10); + _r13_t11 = r13_d2s; + _r13_t12 = _r13_t11['push']; + if (r13_p1['d2'] >= 0) + _r13_t13 = r13_p1['d2']; + else + _r13_t13 = r13_d2; + _r13_t14 = r13_d2 = _r13_t13; + _r13_t12['call'](_r13_t11, _r13_t14); + r13_p0 = r13_p1; + } else if (r13_p1['cubic']) { + r13_p2 = _r13_t2['points'][r13_j + 1]; + r13_p3 = _r13_t2['points'][r13_j + 2]; + _r13_t15 = r13_d1s; + _r13_t16 = _r13_t15['push']; + if (r13_p3['d1'] >= 0) + _r13_t17 = r13_p3['d1']; + else + _r13_t17 = r13_d1; + _r13_t18 = r13_d1 = _r13_t17; + _r13_t16['call'](_r13_t15, _r13_t18); + _r13_t19 = r13_d2s; + _r13_t20 = _r13_t19['push']; + if (r13_p3['d2'] >= 0) + _r13_t21 = r13_p3['d2']; + else + _r13_t21 = r13_d2; + _r13_t22 = r13_d2 = _r13_t21; + _r13_t20['call'](_r13_t19, _r13_t22); + r13_subSegments['push']([ + r13_p0, + r13_p1, + r13_p2, + r13_p3 + ]); + r13_p0 = r13_p3; + r13_j = r13_j + 2; + } else if (true) { + r13_p2 = _r13_t2['points'][r13_j + 1]; + _r13_t23 = r13_d1s; + _r13_t24 = _r13_t23['push']; + if (r13_p2['d1'] >= 0) + _r13_t25 = r13_p2['d1']; + else + _r13_t25 = r13_d1; + _r13_t26 = r13_d1 = _r13_t25; + _r13_t24['call'](_r13_t23, _r13_t26); + _r13_t27 = r13_d2s; + _r13_t28 = _r13_t27['push']; + if (r13_p2['d2'] >= 0) + _r13_t29 = r13_p2['d2']; + else + _r13_t29 = r13_d2; + _r13_t30 = r13_d2 = _r13_t29; + _r13_t28['call'](_r13_t27, _r13_t30); + r13_subSegments['push']([ + r13_p0, + r13_p1, + r13_p2 + ]); + r13_p0 = r13_p2; + r13_j = r13_j + 1; + } else + void 0; + } + r13_f1 = r0_Smooth(r13_d1s, { 'method': 'cubic' }); + r13_f2 = r0_Smooth(r13_d2s, { 'method': 'cubic' }); + r13_left = []; + r13_right = []; + r13_j = 0; + for (; r13_j < r13_subSegments['length']; r13_j = r13_j + 1) { + r13_seg = r13_subSegments[r13_j]; + if (r13_seg['length'] > 3) + _r13_t31 = new r0_Bezier(r13_seg[0]['x'], r13_seg[0]['y'], r13_seg[1]['x'], r13_seg[1]['y'], r13_seg[2]['x'], r13_seg[2]['y'], r13_seg[3]['x'], r13_seg[3]['y']); + else + _r13_t31 = new r0_Bezier(r13_seg[0]['x'], r13_seg[0]['y'], r13_seg[1]['x'], r13_seg[1]['y'], r13_seg[2]['x'], r13_seg[2]['y']); + r13_curve = _r13_t31; + _r13_t0 = 0; + _r13_t1 = r0_SAMPLES; + r13_sample = _r13_t0; + for (; r13_sample < _r13_t1; r13_sample = r13_sample + 1) { + r13_t = r13_j + r13_sample / r0_SAMPLES; + r13_tn = r13_j + (r13_sample + 1) / r0_SAMPLES; + r13_lthis = r13_curve['offset'](r13_sample / r0_SAMPLES, r13_f1(r13_t)); + r13_rthis = r13_curve['offset'](r13_sample / r0_SAMPLES, -r13_f2(r13_t)); + r13_lnext = r13_curve['offset']((r13_sample + 1) / r0_SAMPLES, r13_f1(r13_tn)); + r13_rnext = r13_curve['offset']((r13_sample + 1) / r0_SAMPLES, -r13_f2(r13_tn)); + r13_lnthis1 = r13_curve['offset'](r13_sample / r0_SAMPLES + r0_TINY, r13_f1(r13_t + r0_TINY)); + r13_rnthis1 = r13_curve['offset'](r13_sample / r0_SAMPLES + r0_TINY, -r13_f2(r13_t + r0_TINY)); + r13_lnnext1 = r13_curve['offset']((r13_sample + 1) / r0_SAMPLES - r0_TINY, r13_f1(r13_tn - r0_TINY)); + r13_rnnext1 = r13_curve['offset']((r13_sample + 1) / r0_SAMPLES - r0_TINY, -r13_f2(r13_tn - r0_TINY)); + r13_lnthis2 = r13_curve['offset'](r13_sample / r0_SAMPLES + r0_TINY * 2, r13_f1(r13_t + r0_TINY * 2)); + r13_rnthis2 = r13_curve['offset'](r13_sample / r0_SAMPLES + r0_TINY * 2, -r13_f2(r13_t + r0_TINY * 2)); + r13_lnnext2 = r13_curve['offset']((r13_sample + 1) / r0_SAMPLES - r0_TINY * 2, r13_f1(r13_tn - r0_TINY * 2)); + r13_rnnext2 = r13_curve['offset']((r13_sample + 1) / r0_SAMPLES - r0_TINY * 2, -r13_f2(r13_tn - r0_TINY * 2)); + r13_lnthis3 = r13_curve['offset'](r13_sample / r0_SAMPLES + r0_TINY * 3, r13_f1(r13_t + r0_TINY * 3)); + r13_rnthis3 = r13_curve['offset'](r13_sample / r0_SAMPLES + r0_TINY * 3, -r13_f2(r13_t + r0_TINY * 3)); + r13_lnnext3 = r13_curve['offset']((r13_sample + 1) / r0_SAMPLES - r0_TINY * 3, r13_f1(r13_tn - r0_TINY * 3)); + r13_rnnext3 = r13_curve['offset']((r13_sample + 1) / r0_SAMPLES - r0_TINY * 3, -r13_f2(r13_tn - r0_TINY * 3)); + r13_dlthis = r0_dforward(r13_lthis, r13_lnthis1, r13_lnthis2, r13_lnthis3); + r13_drthis = r0_dforward(r13_rthis, r13_rnthis1, r13_rnthis2, r13_rnthis3); + r13_dlnext = r0_dbackward(r13_lnext, r13_lnnext1, r13_lnnext2, r13_lnnext3); + r13_drnext = r0_dbackward(r13_rnext, r13_rnnext2, r13_rnnext2, r13_rnnext3); + r13_il = r0_intersection(r13_lthis['x'], r13_lthis['y'], r13_dlthis['x'], r13_dlthis['y'], r13_lnext['x'], r13_lnext['y'], r13_dlnext['x'], r13_dlnext['y']); + r13_ir = r0_intersection(r13_rthis['x'], r13_rthis['y'], r13_drthis['x'], r13_drthis['y'], r13_rnext['x'], r13_rnext['y'], r13_drnext['x'], r13_drnext['y']); + if (r13_il['x'] !== null && r13_il['y'] !== null && r0_nonlinear(r13_lthis, r13_il, r13_lnext)) { + r13_left['push']({ + 'x': r13_lthis['x'], + 'y': r13_lthis['y'], + 'onCurve': true + }, { + 'x': r13_il['x'], + 'y': r13_il['y'], + 'onCurve': false + }); + } else { + r13_left['push']({ + 'x': r13_lthis['x'], + 'y': r13_lthis['y'], + 'onCurve': true + }); + } + if (r13_ir['x'] !== null && r13_ir['y'] !== null && r0_nonlinear(r13_rthis, r13_ir, r13_rnext)) { + r13_right['push']({ + 'x': r13_rthis['x'], + 'y': r13_rthis['y'], + 'onCurve': true + }, { + 'x': r13_ir['x'], + 'y': r13_ir['y'], + 'onCurve': false + }); + } else { + r13_right['push']({ + 'x': r13_rthis['x'], + 'y': r13_rthis['y'], + 'onCurve': true + }); + } + } + _r13_t32 = r13_left; + _r13_t33 = _r13_t32['push']; + r13_last = r13_curve['offset'](1, r13_f1(r13_j + 1)); + _r13_t34 = { + 'x': r13_last['x'], + 'y': r13_last['y'], + 'onCurve': true + }; + _r13_t33['call'](_r13_t32, _r13_t34); + _r13_t35 = r13_right; + _r13_t36 = _r13_t35['push']; + r13_last = r13_curve['offset'](1, -r13_f2(r13_j + 1)); + _r13_t37 = { + 'x': r13_last['x'], + 'y': r13_last['y'], + 'onCurve': true + }; + _r13_t36['call'](_r13_t35, _r13_t37); + } + r13_shape = r13_left['concat'](r13_right['reverse']())['map'](function _r13_t38(r15_p) { + var r15_p; + return { + 'x': r15_p['x'], + 'y': r15_p['y'], + 'onCurve': r15_p['onCurve'] + }; + }); + return [r13_shape]; + }; + exports['Stroke'] = r0_Stroke; +} diff --git a/support/stroke.patel b/support/stroke.patel new file mode 100644 index 0000000..3b2b710 --- /dev/null +++ b/support/stroke.patel @@ -0,0 +1,158 @@ +define Smooth [require './smooth'].Smooth +define intersection [require './intersection'].intersection +define Bezier [require 'bezier-js'] + +define SAMPLES 4 +define TINY 0.0001 +define LITTLE 0.01 +define KAPPA 0.51 +define COKAPPA : 1 - KAPPA +define BKAPPA : KAPPA + 0.1 +define COBKAPPA : COKAPPA - 0.1 + +define [Stroke] : begin { + this.points = () + return this +} +define [Stroke.bindParameters para] : begin { + KAPPA = para.kappa + COKAPPA = 1 - KAPPA + COBKAPPA = COKAPPA - 0.1 + BKAPPA = KAPPA + 0.1 +} +define [Stroke.prototype.set-width d1 d2] : begin { + local point this.points`[this.points.length - 1] + point.d1 = d1 + point.d2 = d2 + return this +} +define [Stroke.prototype.start-from x y] : begin { + this.points = ((.x x .y y .onCurve true)) + return this +} +define [Stroke.prototype.line-to x y] : begin { + this.points.push (.x x .y y .onCurve true) + return this +} +define [Stroke.prototype.curve-to xc yc x y] : begin { + this.points.push (.x xc .y yc .onCurve false) (.x x .y y .onCurve true) + return this +} +define [Stroke.prototype.cubic-to x1 y1 x2 y2 x y] : begin { + this.points.push (.x x1 .y y1 .onCurve false .cubic true) (.x x2 .y y2 .onCurve false .cubic true) (.x x .y y .onCurve true) + return this +} +define [Stroke.prototype.arc-vh-to x y] : begin { + local last this.points`[this.points.length - 1] + this.cubic-to last.x [last.y + BKAPPA * [y - last.y]] [x + BKAPPA * [last.x - x]] y x y + return this +} +define [Stroke.prototype.arc-hv-to x y] : begin { + local last this.points`[this.points.length - 1] + this.cubic-to [last.x + BKAPPA * [x - last.x]] last.y x [y + BKAPPA * [last.y - y]] x y + return this +} + + +define [dforward p0 p1 p2 p3] ( + .x [p0.x + [[-11] / 6 * p0.x + 3 * p1.x - 3 / 2 * p2.x + p3.x / 3] / TINY * LITTLE] + .y [p0.y + [[-11] / 6 * p0.y + 3 * p1.y - 3 / 2 * p2.y + p3.y / 3] / TINY * LITTLE] +) +define [dbackward p0 p1 p2 p3] ( + .x [p0.x + [11 / 6 * p0.x - 3 * p1.x + 3 / 2 * p2.x - p3.x / 3] / TINY * LITTLE] + .y [p0.y + [11 / 6 * p0.y - 3 * p1.y + 3 / 2 * p2.y - p3.y / 3] / TINY * LITTLE] +) +define [nonlinear a b c] : [Math.abs [[c.y - a.y] * [b.x - a.x] - [c.x - a.x] * [b.y - a.y]]] > TINY + +define [Stroke.prototype.form-stroke d1 d2] : begin { + local d1s ([set d1 [if [this.points.0.d1 >= 0] this.points.0.d1 d1]]) + local d2s ([set d2 [if [this.points.0.d2 >= 0] this.points.0.d2 d2]]) + local subSegments () + local p0 this.points.0 + for [local j 1] [j < this.points.length] [inc j] : begin { + local p1 this.points`j + piecewise { + p1.onCurve : begin { + subSegments.push (p0 (.x [[p0.x + p1.x] / 2] .y [[p0.y + p1.y] / 2]) p1) + d1s.push : set d1 [if [p1.d1 >= 0] p1.d1 d1] + d2s.push : set d2 [if [p1.d2 >= 0] p1.d2 d2] + p0 = p1 + } + p1.cubic : begin { + local p2 this.points`[j + 1] + local p3 this.points`[j + 2] + d1s.push : set d1 [if [p3.d1 >= 0] p3.d1 d1] + d2s.push : set d2 [if [p3.d2 >= 0] p3.d2 d2] + subSegments.push (p0 p1 p2 p3) + p0 = p3 + j = j + 2 + } + true : begin { + local p2 this.points`[j + 1] + d1s.push : set d1 [if [p2.d1 >= 0] p2.d1 d1] + d2s.push : set d2 [if [p2.d2 >= 0] p2.d2 d2] + subSegments.push (p0 p1 p2) + p0 = p2 + j = j + 1 + } + } + } + local f1 : Smooth d1s (.method 'cubic') + local f2 : Smooth d2s (.method 'cubic') + local left () + local right () + for [local j 0] [j < subSegments.length] [inc j] : begin { + local seg subSegments`j + local curve : if [seg.length > 3] [new Bezier seg.0.x seg.0.y seg.1.x seg.1.y seg.2.x seg.2.y seg.3.x seg.3.y] [new Bezier seg.0.x seg.0.y seg.1.x seg.1.y seg.2.x seg.2.y] + foreach sample [range 0 SAMPLES] : begin { + local t : j + sample / SAMPLES + local tn : j + [sample + 1] / SAMPLES + + local lthis : curve.offset [sample / SAMPLES] [f1 t] + local rthis : curve.offset [sample / SAMPLES] [-[f2 t]] + + local lnext : curve.offset [[sample + 1] / SAMPLES] [f1 tn] + local rnext : curve.offset [[sample + 1] / SAMPLES] [-[f2 tn]] + + local lnthis1 : curve.offset [sample / SAMPLES + TINY] [f1 [t + TINY]] + local rnthis1 : curve.offset [sample / SAMPLES + TINY] [-[f2 [t + TINY]]] + local lnnext1 : curve.offset [[sample + 1] / SAMPLES - TINY] [f1 [tn - TINY]] + local rnnext1 : curve.offset [[sample + 1] / SAMPLES - TINY] [-[f2 [tn - TINY]]] + local lnthis2 : curve.offset [sample / SAMPLES + [TINY * 2]] [f1 [t + [TINY * 2]]] + local rnthis2 : curve.offset [sample / SAMPLES + [TINY * 2]] [-[f2 [t + [TINY * 2]]]] + local lnnext2 : curve.offset [[sample + 1] / SAMPLES - [TINY * 2]] [f1 [tn - [TINY * 2]]] + local rnnext2 : curve.offset [[sample + 1] / SAMPLES - [TINY * 2]] [-[f2 [tn - [TINY * 2]]]] + local lnthis3 : curve.offset [sample / SAMPLES + [TINY * 3]] [f1 [t + [TINY * 3]]] + local rnthis3 : curve.offset [sample / SAMPLES + [TINY * 3]] [-[f2 [t + [TINY * 3]]]] + local lnnext3 : curve.offset [[sample + 1] / SAMPLES - [TINY * 3]] [f1 [tn - [TINY * 3]]] + local rnnext3 : curve.offset [[sample + 1] / SAMPLES - [TINY * 3]] [-[f2 [tn - [TINY * 3]]]] + + local dlthis [dforward lthis lnthis1 lnthis2 lnthis3] + local drthis [dforward rthis rnthis1 rnthis2 rnthis3] + local dlnext [dbackward lnext lnnext1 lnnext2 lnnext3] + local drnext [dbackward rnext rnnext2 rnnext2 rnnext3] + + local il : intersection lthis.x lthis.y dlthis.x dlthis.y lnext.x lnext.y dlnext.x dlnext.y + local ir : intersection rthis.x rthis.y drthis.x drthis.y rnext.x rnext.y drnext.x drnext.y + + if [[il.x != null] && [il.y != null] && [nonlinear lthis il lnext]] [then { + left.push (.x lthis.x .y lthis.y .onCurve true) (.x il.x .y il.y .onCurve false) + }] [else { + left.push (.x lthis.x .y lthis.y .onCurve true) + }] + + if [[ir.x != null] && [ir.y != null] && [nonlinear rthis ir rnext]] [then { + right.push (.x rthis.x .y rthis.y .onCurve true) (.x ir.x .y ir.y .onCurve false) + }] [else { + right.push (.x rthis.x .y rthis.y .onCurve true) + }] + } + left.push [begin [local last [curve.offset 1 [f1 [j + 1]]]] (.x last.x .y last.y .onCurve true)] + right.push [begin [local last [curve.offset 1 [-[f2 [j + 1]]]]] (.x last.x .y last.y .onCurve true)] + } + + local shape : left.concat [right.reverse] :.map [[p] -> (.x p.x .y p.y .onCurve p.onCurve)] + return (shape) +} + +exports.Stroke = Stroke \ No newline at end of file