From 806ec2ce689d33638081a317e83c0a7655067368 Mon Sep 17 00:00:00 2001 From: Cosimo Lupo Date: Wed, 26 Jul 2023 12:06:58 +0100 Subject: [PATCH] keep old --use-mutatormath option to print error when passed nudging to ufoProcessor --- Lib/fontmake/__main__.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Lib/fontmake/__main__.py b/Lib/fontmake/__main__.py index 67ddfa0f..5e1395ba 100644 --- a/Lib/fontmake/__main__.py +++ b/Lib/fontmake/__main__.py @@ -15,7 +15,7 @@ import logging import os import sys -from argparse import ArgumentParser, FileType +from argparse import SUPPRESS, ArgumentParser, FileType from collections import namedtuple from contextlib import contextmanager from textwrap import dedent @@ -308,6 +308,8 @@ def main(args=None): """ ), ) + # no longer show option in --help but keep to produce nice error message + outputGroup.add_argument("--use-mutatormath", action="store_true", help=SUPPRESS) outputGroup.add_argument( "-M", "--masters-as-instances", @@ -612,6 +614,13 @@ def main(args=None): args = vars(parser.parse_args(args)) + use_mutatormath = args.pop("use_mutatormath") + if use_mutatormath: + parser.error( + "MutatorMath is no longer supported by fontmake. " + "Try to use ufoProcessor: https://github.com/LettError/ufoProcessor" + ) + level = args.pop("verbose") _configure_logging(level, timing=args.pop("timing"))