Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

svgfont2svgicons

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svgfont2svgicons

Extract SVG icons from an SVG font

  • 0.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
39
increased by457.14%
Maintainers
1
Weekly downloads
 
Created
Source

svgfont2svgicons

svgfont2svgicons is a simple tool to explode a SVG font into multiple icons.

NPM version Build status Dependency Status devDependency Status Coverage Status Code Climate

## Usage NodeJS module:

var svgfont2svgicons = require('svgfont2svgicons');
var fs = require('fs');
var iconProvider = svgfont2svgicons(options);
var fontStream = fs.createReadStream('myFont.svg');

// Piping the font
fontStream.pipe(iconProvider);

// Saving the SVG files
iconProvider.on('readable', function() {
  var icon;
  do {
    icon = iconProvider.read();
    if(icon) {
      console.log('New icon:', icon.name, icon.codepoint);
      icon.stream.pipe(fs.createWriteStream(icon.name + '.svg'));
    }
  } while(null !== icon);
}).once('end',function() {
  console.log('No more icons !')
});

CLI (install the module globally):

svgicons2svgfont font/src/file.svg icons/dest/directory

Options

Currently no options, feel free to suggest some in the issues.

Stats

NPM NPM

Contributing

Feel free to pull your code if you agree with publishing under the MIT license.

Keywords

FAQs

Package last updated on 08 Jun 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc