Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vdustr/font-splitter

Split the big font file into small subsets
https://github.com/vdustr/font-splitter

code-range css font fonttools split unicode

Last synced: 20 days ago
JSON representation

Split the big font file into small subsets

Awesome Lists containing this project

README

        

# Font Splitter

![npm](https://img.shields.io/npm/v/font-splitter.svg)

Split the big font file into small subsets.

Font Splitter will split the font and generate a css with [`unicode-range`](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/unicode-range) just like Google fonts do.

## Requirement

- [Node.js](https://nodejs.org) 10.0.0+
- [FontTools](https://github.com/fonttools/fonttools)

## Installation

```sh
npm i -g font-splitter
yarn global add font-splitter
```

## Usage

```sh
font-splitter [options]
```

Execute for help:

```sh
$ font-splitter
Usage: font-splitter [options]

Options:
-v, --version output the version number
-c, --chunk chunk size, `-` stand for infinity, default: 256
-f, --flavor font flavor: woff, woff2
-n, --family font family, default: parsed from font
-i, --italic italic font style, default: false
-w, --weight font weight, default: 400
-d, --dry dry run
-q, --quite disable stdout
-o, --output output directory
-h, --help output usage information
```

## Docker

```sh
docker run --rm -it -v :/fonts vdustr/font-splitter
```

### Build Your Image

```sh
docker build -t vdustr/font-splitter .
```