An open API service indexing awesome lists of open source software.

https://github.com/ladjs/svgfont2js


https://github.com/ladjs/svgfont2js

Last synced: 6 months ago
JSON representation

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
```