Skip to content

Latest commit

 

History

History
59 lines (40 loc) · 901 Bytes

README.md

File metadata and controls

59 lines (40 loc) · 901 Bytes

Font Generator

This project is used to extract fonts.

It minify font's size when you don't need full fonts.

Install git module

git submodule update

Install docker image

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:

./generate-font.sh -i Hanzipen.ttc -o webfont.zip -f text.txt --webfont fontName

Output zip tree:

fontName.tff
fontName.svg
fontName.woff
fontName.css
index.html

See dockerhub if you need use web server.

Build dockerfile of web server

docker build --no-cache -t peter1209/font-generator-server -f dockerfile/Dockerfile .