Added "weights" option for make custom-config. Fixes #243.

This commit is contained in:
belleve 2018-01-29 15:58:30 +08:00
parent 31bf5dea5b
commit 93bb461b40
3 changed files with 14 additions and 3 deletions

View file

@ -3,7 +3,10 @@ const path = require("path");
const argv = require("yargs").argv;
const pad = require("pad");
const weights = ["thin", "extralight", "light", "book", "medium", "bold", "heavy"];
const possibleWeights = new Set(["thin", "extralight", "light", "book", "medium", "bold", "heavy"]);
const weights = argv.weights
? argv.weights.split(/ +/g).filter(w => possibleWeights.has(w))
: [...possibleWeights];
const slantnesses = ["upright", "italic", "oblique"];
const widths = ["term", "normal", "cc"];
const designs = ["sans", "slab"];