https://github.com/ladjs/svgfont2js
https://github.com/ladjs/svgfont2js
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ladjs/svgfont2js
- Owner: ladjs
- Created: 2022-04-23T20:54:51.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-04-26T23:43:35.000Z (over 3 years ago)
- Last Synced: 2025-06-29T11:49:50.986Z (6 months ago)
- Language: JavaScript
- Size: 38.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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
```sh
npm install @ladjs/svgfont2js
```
## Usage
```JavaScript
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.
```sh
npm run build
```