Skip to content

Commit

Permalink
Merge pull request #501 from anthrotype/sparse-layers-and-cff2-support
Browse files Browse the repository at this point in the history
WIP: Sparse layers and (experimental) CFF2 support
  • Loading branch information
madig authored Feb 4, 2019
2 parents 9963c06 + 9a92538 commit 0260e2d
Show file tree
Hide file tree
Showing 6 changed files with 333 additions and 128 deletions.
15 changes: 12 additions & 3 deletions Lib/fontmake/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from contextlib import contextmanager
from argparse import ArgumentParser, ArgumentTypeError
from fontmake import __version__
from fontmake.font_project import FontProject
from fontmake.font_project import FontProject, INTERPOLATABLE_OUTPUTS
from fontmake.errors import FontmakeError
from ufo2ft.featureWriters import loadFeatureWriterFromString
from ufo2ft import CFFOptimization
Expand Down Expand Up @@ -93,7 +93,16 @@ def main(args=None):
'-o', '--output', nargs='+', default=('otf', 'ttf'), metavar="FORMAT",
help='Output font formats. Choose between: %(choices)s. '
'Default: otf, ttf',
choices=('ufo', 'otf', 'ttf', 'ttf-interpolatable', 'variable'))
choices=(
'ufo',
'otf',
'ttf',
'ttf-interpolatable',
'otf-interpolatable',
'variable',
'variable-cff2',
)
)
outputSubGroup = outputGroup.add_mutually_exclusive_group()
outputSubGroup.add_argument(
'--output-path', default=None,
Expand Down Expand Up @@ -248,7 +257,7 @@ def main(args=None):
"designspace" if designspace_path else
"UFO") + " source"

if 'variable' in args['output']:
if INTERPOLATABLE_OUTPUTS.intersection(args['output']):
if not (glyphs_path or designspace_path):
parser.error(
'Glyphs or designspace source required for variable font')
Expand Down
Loading

0 comments on commit 0260e2d

Please sign in to comment.