@ladjs/svgfont2js
v1.0.1
Published
Parse SVG font glyphs into JSON objects with normalized coordinates
Downloads
578
Readme
@ladjs/svgfont2js
Parse SVG font glyphs into JSON objects with normalized coordinates. The resulting path data can be used directly in SVG documents or HTML5 canvas API to draw glyphs.
Installation
npm install @ladjs/svgfont2js
Usage
var fs = require("fs");
var svgfont2js = require("@ladjs/svgfont2js");
console.log(svgfont2js(fs.readFileSync("font.svg", "utf8")));
Build
Transpile the source code (written in ES6) to ES5 for distribution.
npm run build