# csvg-to-font

> Convert svg to font

Latest version **1.0.20** (published 2023-12-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install csvg-to-font
pnpm add csvg-to-font
yarn add csvg-to-font
bun add csvg-to-font
```

Provides the command `csvg-to-font`.

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.20 |
| Published | 2023-12-22 |
| First published | 2023-07-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 22 |
| Unpacked size | 49.7 KB |
| Known vulnerabilities | 0 (+4 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 10 |
| Author | hunghg255 |
| Maintainers | hunghg255 |
| Keywords | svg, font, convert svg to font |

## Links

- npm: https://www.npmjs.com/package/csvg-to-font
- Repository: https://github.com/hunghg255/svg-to-font
- Issues: https://github.com/hunghg255/svg-to-font/issues
- npm.io page: https://npm.io/package/csvg-to-font

## Dependencies (22)

- [ejs](https://npm.io/package/ejs.md) ~3.1.9
- [svgo](https://npm.io/package/svgo.md) ~3.0.5
- [globby](https://npm.io/package/globby.md) ^13.2.2
- [cheerio](https://npm.io/package/cheerio.md) ~1.0.0-rc.12
- [consola](https://npm.io/package/consola.md) ^3.2.3
- [svg2ttf](https://npm.io/package/svg2ttf.md) ~6.0.3
- [ttf2eot](https://npm.io/package/ttf2eot.md) ~3.1.0
- [fs-extra](https://npm.io/package/fs-extra.md) ~11.1.1
- [ttf2woff](https://npm.io/package/ttf2woff.md) ~3.0.0
- [commander](https://npm.io/package/commander.md) ^11.1.0
- [ttf2woff2](https://npm.io/package/ttf2woff2.md) ~5.0.0
- [@types/ejs](https://npm.io/package/@types/ejs.md) ~3.1.5
- [colors-cli](https://npm.io/package/colors-cli.md) ~1.0.33
- [unreadconfig](https://npm.io/package/unreadconfig.md) ^0.0.12
- [@types/cheerio](https://npm.io/package/@types/cheerio.md) ~0.22.35
- [@types/svg2ttf](https://npm.io/package/@types/svg2ttf.md) ~5.0.3
- [@types/ttf2eot](https://npm.io/package/@types/ttf2eot.md) ~2.0.2
- [@types/fs-extra](https://npm.io/package/@types/fs-extra.md) ^11.0.4
- [@types/ttf2woff](https://npm.io/package/@types/ttf2woff.md) ~2.0.4
- [@types/ttf2woff2](https://npm.io/package/@types/ttf2woff2.md) ~2.0.2
- [svgicons2svgfont](https://npm.io/package/svgicons2svgfont.md) ~12.0.0
- [@types/svgicons2svgfont](https://npm.io/package/@types/svgicons2svgfont.md) ~10.0.5

## 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
- [stockfish](https://npm.io/package/stockfish.md) — 27.0K weekly downloads
- [@procore/core-icons](https://npm.io/package/@procore/core-icons.md) — 4.6K weekly downloads

## Recent versions

- 1.0.20 (latest) — 2023-12-22
- 1.0.19 — 2023-12-22
- 1.0.18 — 2023-12-20
- 1.0.17 — 2023-12-20
- 1.0.16 — 2023-12-20
- 1.0.15 — 2023-10-09
- 1.0.14 — 2023-10-09
- 1.0.13 — 2023-10-09
- 1.0.11 — 2023-10-09
- 1.0.10 — 2023-10-09
- 1.0.9 — 2023-10-09
- 1.0.8 — 2023-09-05
- 1.0.7 — 2023-09-02
- 1.0.6 — 2023-09-02
- 1.0.5 — 2023-07-17
- … 5 more at https://npm.io/package/csvg-to-font/versions

## README

# Convert svg to font

[![npm version](https://badge.fury.io/js/csvg-to-font.svg)](https://badge.fury.io/js/csvg-to-font) [![npm](https://img.shields.io/npm/dw/csvg-to-font.svg?logo=npm)](https://www.npmjs.com/package/csvg-to-font) [![npm](https://img.shields.io/bundlephobia/minzip/csvg-to-font)](https://www.npmjs.com/package/csvg-to-font)
[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)

- Convert svg to font
- Support React
- Support React Native
- Support Typescript

## Demo

[Github](https://github.com/hunghg255/react-svg-to-font)

[Demo](https://react-svg-to-font.vercel.app/)

## Install

```bash
npm i csvg-to-font@latest --save-dev
```

## Setup

### Create file: `svgtofont.config.{ts,js,mjs}`

```js
import { defineConfig } from 'csvg-to-font';

export default defineConfig({
  src: 'svg', // svg path
  dist: 'dist', // output path
  fontName: 'svgtofont', // font name
  css: true, // Create CSS files.
  outSVGReact: true,
  outSVGReactNative: true, // Create React native folder
  outSVGPath: true,
  typescript: true,
});
```

## CLI (file package.json)

```
-c: Config
```

```json
{
  ...
  "scripts": {
    ...
    "svg-2-font": "csvg-to-font",
  },
  ...
}
```

### Custom config file

- You can also use a custom config file instead of `svgtofont.config.{ts,js,mjs}`. Just create `<FILE_NAME>.config.{ts,js,mjs}` to build command

```js
Exp: awesome.config.ts;
```

```json
{
  ...
  "scripts": {
    ...
    "svg-2-font": "csvg-to-font -c awesome",
  },
  ...
}
```

### About

<a href="https://www.buymeacoffee.com/hunghg255" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>

Gia Hung – [hung.hg](https://hung.thedev.id)

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