Skip to content

Commit 7e957eb

Browse files
committed
all generateXXX options are optional
1 parent 9f11ff0 commit 7e957eb

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

source/lib/batchGenerators/variableFontsGenerator/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -462,13 +462,13 @@ def generate(self):
462462
def build(root, generateOptions, settings, progress, report):
463463

464464
binaryFormats = []
465-
if generateOptions["variableFontGenerate_OTF"]:
465+
if generateOptions.get("variableFontGenerate_OTF"):
466466
binaryFormats.append(("otf", postProcessCollector()))
467-
if generateOptions["variableFontGenerate_OTFWOFF2"]:
467+
if generateOptions.get("variableFontGenerate_OTFWOFF2"):
468468
binaryFormats.append(("otf-woff2", postProcessCollector(WOFF2Builder)))
469-
if generateOptions["variableFontGenerate_TTF"]:
469+
if generateOptions.get("variableFontGenerate_TTF"):
470470
binaryFormats.append(("ttf", postProcessCollector()))
471-
if generateOptions["variableFontGenerate_TTFWOFF2"]:
471+
if generateOptions.get("variableFontGenerate_TTFWOFF2"):
472472
binaryFormats.append(("ttf-woff2", postProcessCollector(WOFF2Builder)))
473473

474474
if not binaryFormats:

source/lib/batchGenerators/webFontsGenerator/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ def build(root, generateOptions, settings, progress, report):
8989
htmlBuilderFunc = None
9090

9191
binaryFormats = []
92-
if generateOptions["webFontGenerate_OTF"]:
92+
if generateOptions.get("webFontGenerate_OTF"):
9393
binaryFormats.append(("otf", postProcessCollector(autohintFunc, htmlBuilderFunc)))
94-
if generateOptions["webFontGenerate_OTFWOFF2"]:
94+
if generateOptions.get("webFontGenerate_OTFWOFF2"):
9595
binaryFormats.append(("otf-woff2", postProcessCollector(autohintFunc, WOFF2Builder, htmlBuilderFunc)))
96-
if generateOptions["webFontGenerate_TTF"]:
96+
if generateOptions.get("webFontGenerate_TTF"):
9797
binaryFormats.append(("ttf", postProcessCollector(autohintFunc, htmlBuilderFunc)))
98-
if generateOptions["webFontGenerate_TTFWOFF2"]:
98+
if generateOptions.get("webFontGenerate_TTFWOFF2"):
9999
binaryFormats.append(("ttf-woff2", postProcessCollector(autohintFunc, WOFF2Builder, htmlBuilderFunc)))
100100
# if generateOptions["webFontGenerate_SVG"]:
101101
# binaryFormats.append(("svg", None))

0 commit comments

Comments
 (0)