Giter Site home page Giter Site logo

font-pack's Introduction

Font Pack

npm

A tool helps to generate ttf, woff, woff2 and css file at the same time. Supports splitting font files on demand.

一个可以根据常用字体格式文件,直接生成 ttf、woff 和 woff2 字体文件、以及包含该字体font-face定义的 css 文件。同时可以根据需要的字符集裁剪字体文件,实现类似font-spider的功能。

Usage

Only generate web font

npx font-pack test.ttf -o dist

Output Files:

dist/test.css
dist/test.tff
dist/test.woff
dist/test.woff2

Split font file

This will generate two font files, one only contain the charset required, and the other contains the rest charset of the font itself.

npx font-pack test.ttf --split-name test2 --split-chars abcdefg1234567

Output Files:

dist/test.css
dist/test.tff
dist/test.woff
dist/test.woff2
dist/test2.css
dist/test2.tff
dist/test2.woff
dist/test2.woff2

Acknowledgement

License

MIT License. See here for details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.