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.
Add webfont-extract as a project dependency
npm install @virae/webfont-extractor
yarn add @virae/webfont-extractimport 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')Please open an issue for support.
Please contribute using Github Flow. Create a branch, add commits, and open a pull request.