Skip to content

virae/webfont-extract

Repository files navigation

Webfont extract

Simple library to extract SVG files or SVG data from any icon based webfont (e.g. Material Design Icons, Entypo, Font Awesome, ...). Project is heavily inspired by font-blast.

Installation

Add webfont-extract as a project dependency

npm install @virae/webfont-extract

or

yarn add @virae/webfont-extract

Usage

import webfontExtract from '@virae/webfont-extract'

# path to the custom icon font
const fontPath = 'assets/custom-font.svg'

# extract and get SVG data from the given font
const svgData = await webfontExtract(fontPath)

# or ... extract and save SVGs to specified output directory
await webfontExtract(fontPath, 'path-to-output-directory')

Support

Please open an issue for support.

Contributing

Please contribute using Github Flow. Create a branch, add commits, and open a pull request.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages