https://github.com/ehanlin/font-generator
Extract fonts to minify your file size.
https://github.com/ehanlin/font-generator
font font-generator
Last synced: 3 months ago
JSON representation
Extract fonts to minify your file size.
- Host: GitHub
- URL: https://github.com/ehanlin/font-generator
- Owner: eHanlin
- License: mit
- Created: 2015-12-16T09:10:34.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-05-09T03:54:57.000Z (almost 6 years ago)
- Last Synced: 2024-12-30T09:32:37.871Z (4 months ago)
- Topics: font, font-generator
- Language: Python
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
Font Generator
===================This project is used to extract fonts.
It minify font's size when you don't need full fonts.
## Install git module
```sh
git submodule update
```## Install docker image
```sh
docker pull peter1209/fontforge
```## Support input format
* ttf
* svg
* ttc
* woff## Usage
* **-i**: Input a font file
* **-o**: Output a zip file
* **-f**: Input a text file
* **--webfont**: New font name
* **--base64**: Encode base64**Run:**
```sh
./generate-font.sh -i Hanzipen.ttc -o webfont.zip -f text.txt --webfont fontName
```**Output zip tree:**
```sh
fontName.tff
fontName.svg
fontName.woff
fontName.css
index.html
```See [dockerhub](https://hub.docker.com/r/peter1209/font-generator-server/) if you need use **web server**.
## Build dockerfile of web server
```sh
docker build --no-cache -t peter1209/font-generator-server -f dockerfile/Dockerfile .
```