diff --git a/build-plans.toml b/build-plans.toml index e30af4c14..04f423a29 100644 --- a/build-plans.toml +++ b/build-plans.toml @@ -233,3 +233,5 @@ oblique = "oblique" # upright = ["upright-only", "styles"] # Upright-only styles # italic = ["italic-only", "styles"] # Italic-only styles # oblique = ["oblique-only", "styles"] # Oblique-only styles +# weights = ["regular", "bold"] # Build only regular and bold fonts +# slants = ["upright", "italic"] # Build only upright and italic fonts diff --git a/verdafile.js b/verdafile.js index af5d67551..d2635109a 100644 --- a/verdafile.js +++ b/verdafile.js @@ -102,9 +102,11 @@ oracle(`o:font-building-parameters`).def(async target => { const fontInfos = {}; const bp = {}; for (const p in buildPlans) { - const { pre, post, prefix, family } = buildPlans[p]; + const { pre, post, prefix, family, weights, slants } = buildPlans[p]; const targets = []; for (const suffix in suffixMapping) { + if (weights && !weights.includes(suffixMapping[suffix].weight)) continue; + if (slants && !slants.includes(suffixMapping[suffix].slant)) continue; const fileName = [prefix, suffix].join("-"); const preHives = [...pre.design, ...pre[suffixMapping[suffix].slant]]; const postHives = [...post.design, ...post[suffixMapping[suffix].slant]];