-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run filter from CLI #470
Run filter from CLI #470
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very useful, thanks!
Lib/ufo2ft/filters/__main__.py
Outdated
if not args.output: | ||
args.output = makeOutputFileName(args.ufo) | ||
|
||
ufo = defcon.Font(args.ufo) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you mind switching to ufoLib2 instead? or try ufoLib2 then defcon then ImportError
You can use loadFilterFromString() now that #466 has been merged. |
good point, yes please |
LGTM |
I modified this slightly to set the include/exclude attribute on the filter instance after it has been initialized from the CLI string, this way we can support initializing the filter not only using the filter class name but also with optional keyword arguments
|
similar to #470 but for featureWriters. Also useful for testing/debugging.
similar to #470 but for featureWriters. Also useful for testing/debugging.
This allows the user to run a ufo2ft filter (or filters) on a UFO file and save it from the command line. This is helpful for testing and debugging filters, as well as doing general filter-based operations on fonts.