Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/vdustr/font-splitter
- Owner: VdustR
- License: mit
- Created: 2019-07-20T10:09:17.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-07-18T20:07:36.000Z (over 1 year ago)
- Last Synced: 2024-10-14T13:19:59.100Z (about 1 month ago)
- Topics: code-range, css, font, fonttools, split, unicode
- Language: JavaScript
- Size: 997 KB
- Stars: 28
- Watchers: 3
- Forks: 2
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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 .
```