字体转换
woff2
sh
# mac
brew install woff2
# linux
sudo apt install woff2sh
woff2_compress NotoSerifSC-VariableFont_wght.ttf
# Processing NotoSerifSC-VariableFont_wght.ttf => NotoSerifSC-VariableFont_wght.woff2
# Compressed 21734024 to 11009952.npm
ttf2woff
sh
npm install -g ttf2woff
ttf2woff fontello.ttf fontello.woffwoff2
ts
var woff2 = require("woff2");
var input = fs.readFileSync("something.woff2");
var output = "output.ttf";
fs.writeFileSync(output, woff2.decode(input));