def sfnt2woff(otf_path, woff_path=None):
    """
    Generate a .woff file from an .otf or .ttf font.

    Requires ``sfnt2woff`` installed on your system.

    """
    command = ['sfnt2woff', "%s" % otf_path]
    executeCommand(command, shell=True)
    woff_path_temp = '%s.woff' % os.path.splitext(otf_path)[0]
    if woff_path is not None and os.path.exists(woff_path_temp):
        shutil.move(woff_path_temp, woff_path)

#-------------
# WOFF2 tools
#-------------
dataset/ETHPy150Open gferreira/hTools2/Lib/hTools2/modules/webfonts.py/sfnt2woff/original