This allows to to reduce system fonts, where you don't have write
permission on the source directory. For example, I was trying to
reduce GoodCityModern:
$ font-reduce.py /usr/share/fonts/freefonts/gocmase_.pfb
Save Failed
Traceback (most recent call last):
…
File "…/font-reduce.py", line 65, in convert
o.generate(output_file, flags=('PfEd-comments',))
EnvironmentError: Font generation failed
Which is a cryptic error message for a `permission denied` error. The
newly supported working equivalent is:
$ font-reduce.py -o GoodCityModern.woff /usr/share/fonts/freefonts/gocmase_.pfb
'-l', '--license', help='override font license text')
parser.add_argument(
'-s', '--source', help='override font source URL')
+ parser.add_argument(
+ '-o', '--output', help='override path to output file')
parser.add_argument(
'font', nargs='+', help='path to source font')
args = parser.parse_args()
for font in args.font:
- convert(font, license=args.license, source=args.source)
+ convert(font, output_file=args.output, license=args.license,
+ source=args.source)