# svg2ttf-nfd

> Converts SVG font to TTF font

Latest version **1.0.0** (published 2017-06-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install svg2ttf-nfd
pnpm add svg2ttf-nfd
yarn add svg2ttf-nfd
bun add svg2ttf-nfd
```

Provides the command `svg2ttf`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-06-01 |
| First published | 2017-06-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 (+22 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 542 |
| Author | decadeken |
| Maintainers | vitaly |
| Keywords | font, ttf, svg, convertor |

## Links

- npm: https://www.npmjs.com/package/svg2ttf-nfd
- Repository: https://github.com/fontello/svg2ttf
- Homepage: https://github.com/fontello/svg2ttf#readme
- Issues: https://github.com/fontello/svg2ttf/issues
- npm.io page: https://npm.io/package/svg2ttf-nfd

## Dependencies (6)

- [lodash](https://npm.io/package/lodash.md) ^3.6.0
- [xmldom](https://npm.io/package/xmldom.md) ~0.1.16
- [svgpath](https://npm.io/package/svgpath.md) ^2.1.2
- [argparse](https://npm.io/package/argparse.md) ^1.0.3
- [cubic2quad](https://npm.io/package/cubic2quad.md) ^1.0.0
- [microbuffer](https://npm.io/package/microbuffer.md) ^1.0.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
- [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.0 (latest) — 2017-06-01

## README

svg2ttf
========

[![NPM version](https://img.shields.io/npm/v/svg2ttf.svg?style=flat)](https://www.npmjs.org/package/svg2ttf)

> Converts SVG fonts to TTF format. It was initially written for
[Fontello](http://fontello.com), but you can find it useful for your projects.

__For developpers:__

Internal API is similar to FontForge's one. Since primary goal
is generating iconic fonts, sources can lack some spesific TTF/OTF features,
like kerning and so on. Anyway, current code is a good base for development,
because it will save you tons of hours to implement correct writing & optimizing
TTF tables.


Using from CLI
----------------

Install:

``` bash
npm install -g svg2ttf
```

Usage example:

``` bash
svg2ttf fontello.svg fontello.ttf
```


API
---

### svg2ttf(svgFontString, options) -> buf

- `svgFontString` - SVG font content
- `options`
  - `copyright` - copyright string (optional)
  - `ts` - Unix timestamp (in seconds) to override creation time (optional)
- `buf` - internal [byte buffer](https://github.com/fontello/microbuffer)
   object, similar to DataView. It's `buffer` property is  `Uin8Array` or `Array`
   with ttf content.

Example:

``` javascript
var fs = require('fs');
var svg2ttf = require('svg2ttf');

var ttf = svg2ttf(fs.readFileSync('myfont.svg'), {});
fs.writeFileSync('myfont.ttf', new Buffer(ttf.buffer));
```


Authors
-------

* Sergey Batishchev - [@snb2013](https://github.com/snb2013)
* Vitaly Puzrin - [@puzrin](https://github.com/puzrin)


License
-------

[MIT](https://github.com/nodeca/svg2ttf/blob/master/LICENSE).

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