font-split-cli
v0.0.1-pre.1
Published
A tool for splitting font files
Downloads
1
Readme
_____ _ ____ _ _ _
| ___|__ _ __ | |_ / ___| _ __ | (_) |_
| |_ / _ \| '_ \| __| \___ \| '_ \| | | __|
| _| (_) | | | | |_ ___) | |_) | | | |_
|_| \___/|_| |_|\__| |____/| .__/|_|_|\__|
|_|
Subset a single font file according to the provided Unicode Range
⚠️This tools is still in development
Features
- Analyze the css file from remote(local will support later)
- Subset the font file according to the css file
- Compress the font file to woff2 format
- Generate the css file with the subsetted font file(cusomized url will support later)
Requirements
fonttools(Python)
Install
npm install -g font-split
Usage
Please make sure that the unicode range is correct, and not duplicated. example:
font-split -c ./config.json
config.json(recommend)
{
"template": {
"type": "remote",
"path": "https://fonts.googleapis.com/css2?family=Noto+Sans+SC&display=swap"
},
"font-style": {
"family": "Noto Sans SC",
"style": "normal",
"weight": "400",
"display": "swap"
},
"target-font": {
"path": "./Noto.ttf",
}
}
Todo:
- Support local css file
- Remove duplicate Unicode Range
- Merge css file
- ...
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please follow the AngularJS Git Commit Message Conventions