Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cenfun/svg-font-extractor
Extract all glyphs in the svg font to separate svg icon files
https://github.com/cenfun/svg-font-extractor
extractor font glyph icons svg
Last synced: 15 days ago
JSON representation
Extract all glyphs in the svg font to separate svg icon files
- Host: GitHub
- URL: https://github.com/cenfun/svg-font-extractor
- Owner: cenfun
- License: mit
- Created: 2022-09-01T11:49:08.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-04T12:21:54.000Z (over 2 years ago)
- Last Synced: 2024-10-18T08:38:57.905Z (4 months ago)
- Topics: extractor, font, glyph, icons, svg
- Language: JavaScript
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# svg-font-extractor
> Extract all glyphs in the svg font to separate svg icon files## Install
```sh
npm i svg-font-extractor
```## Usage
```js
const SFE = require('svg-font-extractor');
SFE({
input: "path/to/svg-font.svg",
output: "path/to/output/dir",
onSVGItem: function(item) {
// update item name if no glyph-name
// item.name = youNameMap[item.unicode]
return item;
}
});```
see [test/test/js](/test/test.js)## Changelog