<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          Plumin.jsJavaScript 字體操作庫

          聯(lián)合創(chuàng)作 · 2023-09-22 08:19

          Plumin.js 是一個用在瀏覽器和 Node.js 上對字體進行操作的 JavaScript 庫,示例代碼:

          (function(p) {
          
          var font = new p.Font({
                  familyName: 'Demo',
                  ascender: 800,
                  descender: -100
              }),
              a = new p.Glyph({
                  name: 'a',
                  unicode: 'a',
                  advanceWidth: 496
              }),
              i = new p.Glyph({
                  name: 'i',
                  unicode: 'i',
                  advanceWidth: 268
              }),
              o = new p.Glyph({
                  name: 'o',
                  unicode: 'o',
                  advanceWidth: 536
              }),
              shape;
          
          // a contour
          shape = new p.Path.RegularPolygon({
              center: [268, 124],
              sides: 3,
              radius: 248
          });
          shape.rotate(180, [268, 124]);
          shape.scale(1, 1.4, [268, 0]);
          a.addContour(shape);
          
          // i contour
          shape = new p.Path.Rectangle({
              point: [60, 0],
              size: [140, 500]
          });
          i.addContour(shape);
          
          // o contour
          shape = new p.Path.Ellipse({
              point: [50, 0],
              size: [436, 510]
          });
          o.addContour(shape);
          
          font.addGlyphs([ a, i, o ]);
          font.updateOTCommands()
              .addToFonts();
          
          })(plumin.paper);
          
          瀏覽 26
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          評論
          圖片
          表情
          推薦
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  三级成人视频 | 国产精品久久久久久久久借妻 | 大香蕉大香蕉在线 | 免费黄色电影在线网站 | 欧美成人片网站啊 |