# svg-to-iconfont

> Converts SVG to TTF/EOT/WOFF/SVG format fonts.

Latest version **1.1.6** (published 2020-09-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install svg-to-iconfont
pnpm add svg-to-iconfont
yarn add svg-to-iconfont
bun add svg-to-iconfont
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.6 |
| Published | 2020-09-28 |
| First published | 2018-12-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 12.3 KB |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | sxd1991 |
| Maintainers | sxd1991 |
| Keywords | webfont, icon, iconfont, font-face, compress, minify, font-cli, ttf, woff, eot, svg, css, base64 |

## Links

- npm: https://www.npmjs.com/package/svg-to-iconfont
- Repository: https://github.com/AiMe1991/svg-to-iconfont
- Homepage: https://github.com/AiMe1991/svg-to-iconfont#readme
- Issues: https://github.com/AiMe1991/svg-to-iconfont/issues
- npm.io page: https://npm.io/package/svg-to-iconfont

## Dependencies (10)

- [ejs](https://npm.io/package/ejs.md) ^2.6.1
- [svg2ttf](https://npm.io/package/svg2ttf.md) ^4.1.0
- [ttf2eot](https://npm.io/package/ttf2eot.md) ^2.0.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^7.0.0
- [ttf2woff](https://npm.io/package/ttf2woff.md) ^2.0.1
- [ttf2woff2](https://npm.io/package/ttf2woff2.md) ^2.0.3
- [colors-cli](https://npm.io/package/colors-cli.md) ^1.0.18
- [html-minifier](https://npm.io/package/html-minifier.md) ^3.5.20
- [svgicons2svgfont](https://npm.io/package/svgicons2svgfont.md) ^9.1.1
- [copy-template-dir](https://npm.io/package/copy-template-dir.md) ^1.4.0

## Alternatives

- [@fortawesome/react-fontawesome](https://npm.io/package/@fortawesome/react-fontawesome.md) — 2.2M weekly downloads
- [roboto-fontface](https://npm.io/package/roboto-fontface.md) — 196.0K weekly downloads
- [@react-native-vector-icons/common](https://npm.io/package/@react-native-vector-icons/common.md) — 150.4K weekly downloads
- [@procore/core-icons](https://npm.io/package/@procore/core-icons.md) — 4.6K weekly downloads
- [@react-md/material-icons](https://npm.io/package/@react-md/material-icons.md) — 1.6K weekly downloads

## Recent versions

- 1.1.6 (latest) — 2020-09-28
- 1.1.5 — 2020-09-16
- 1.1.4 — 2020-09-16
- 1.1.3 — 2020-09-16
- 1.1.2 — 2020-05-11
- 1.1.1 — 2020-05-11
- 1.1.0 — 2020-05-11
- 1.0.2 — 2019-01-02
- 1.0.1 — 2018-12-24
- 1.0.0 — 2018-12-24

## README

svg-to-iconfont
---

Read a set of SVG icons and ouput a TTF/EOT/WOFF/SVG font, Generator of fonts from SVG icons.
将svg文件转换为字体图标

## Install

```bash
npm i svg-to-iconfont
```

## Usage

```js
const svgtoiconfont = require("../src");
const path = require("path");
const rootPath = path.resolve(process.cwd(), "test");
const svgtoiconfont = require("svg-to-iconfont");
 
svgtoiconfont({
  dist: path.resolve(rootPath, "dist"), // output path(输出文件路径)
  src: path.resolve(rootPath, "svg"), // svg path(svg资源路径)
  fontName: "icomoon", // font name （字体名称）
  classNamePrefix: "e6-icon", // class name prefix （class前缀）
}).then(() => {
  console.log('done!');
});
```

---
_Source: https://npm.io/package/svg-to-iconfont · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
