npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@jayson991/svg2font-cli

v1.0.0

Published

Generate icon fonts from SVG files — CLI

Readme

@jayson991/svg2font-cli

Convert SVG icon sets into complete iconfont bundles — CLI tool

npm version License: MIT Node.js Version

A pre-compiled Rust binary distributed as a platform-specific npm package. No Node.js build tools or native compilation required at install time.

For the programmatic TypeScript/napi API, see @jayson991/svg2font.

Requirements

  • Node.js 18 or higher
  • One of: macOS (arm64/x64), Linux (arm64/x64), Windows (x64)

Installation

# Global CLI
npm install -g @jayson991/svg2font-cli

# Or with pnpm
pnpm add -g @jayson991/svg2font-cli

# Or with yarn
yarn global add @jayson991/svg2font-cli

Quick Start

Step 1: Place your SVG icons in a folder:

icons/
├── home.svg
├── user.svg
└── settings.svg

Step 2: Run the command:

svg2font --src "icons/**/*.svg" --dist dist --font-name myicons

Step 3: Unzip and use the output:

dist/
└── myicons/
    ├── myicons.ttf
    ├── myicons.woff
    ├── myicons.woff2
    ├── myicons.eot
    ├── myicons.svg
    ├── myicons.css
    ├── myicons.js
    ├── myicons.symbol.svg
    ├── myicons.json
    ├── demo.html
    └── demo.css

Open demo.html to preview all icons and copy usage code snippets.

CLI Options

| Option | Alias | Default | Description | |--------|-------|---------|-------------| | --src | -s | svg/**/*.svg | Glob pattern for source SVG files | | --dist | -d | dist | Output directory | | --font-name | -n | iconfont | Font family name (used in file names and CSS) | | --prefix | -p | icon | CSS class prefix (e.g. icon-home) | | --start-unicode | — | e001 | Starting Unicode codepoint (hex, e.g. e001) | | --help | -h | — | Show help | | --version | -V | — | Show version |

Output Bundle

The command generates a directory at dist/{font-name}/ containing:

| File | Description | |------|-------------| | {name}.ttf | TrueType font | | {name}.woff | WOFF font (zlib compressed) | | {name}.woff2 | WOFF2 font (brotli compressed) | | {name}.eot | EOT font (IE11 support) | | {name}.svg | SVG font | | {name}.css | Stylesheet with @font-face and all three usage methods | | {name}.js | SVG sprite auto-injector script | | {name}.symbol.svg | SVG sprite definitions | | {name}.json | Glyph metadata (names, codepoints) | | demo.html | Interactive preview page | | demo.css | Demo page styles |

Three Usage Methods

1. Unicode Mode

<link rel="stylesheet" href="myicons.css">
<span class="iconfont">&#xe001;</span>

2. Font Class Mode (recommended)

<link rel="stylesheet" href="myicons.css">
<i class="iconfont icon-home"></i>
<i class="iconfont icon-user"></i>

3. SVG Symbol Mode

<script src="myicons.js"></script>
<svg class="icon" aria-hidden="true">
  <use href="#icon-home"></use>
</svg>

SVG File Requirements

  • Valid SVG with <path> elements
  • viewBox attribute (or width/height)
  • No external dependencies (linked images, external CSS)
  • Single color recommended for font mode

Filenames are automatically converted to kebab-case:

  • home.svg.icon-home
  • Arrow Right.svg.icon-arrow-right

Platform Support

| Platform | Architecture | |----------|-------------| | macOS | arm64 (Apple Silicon) | | macOS | x64 (Intel) | | Linux | x64 | | Linux | arm64 | | Windows | x64 |

License

MIT © Jayson Wu