Quoting from TTX/FontTools Sourceforge Project
a tool to convert OpenType and TrueType fonts to and from XML. FontTools is a library for manipulating fonts, written in Python. It supports TrueType, OpenType, AFM and to an extent Type 1 and some Mac-specific formats.
python setup.py install
From your command line type the above command to get fontools installed on your system. FontTools requires Python 2.7, or Python 3.3 or later.
See install.txt in the 'Doc' subdirectory for instructions on how to build and install TTX/FontTools from the sources.
See documentation.html in the "Doc" subdirectory for TTX usage instructions and information about the TTX file format.
The fontTools project was started by Just van Rossum in 1999, and was maintained as an open source project at http://sourceforge.net/projects/fonttools/. In 2008, Paul Wise (pabs3) began helping Just with stability maintenance. In 2013 Behdad Esfahbod began a friendly fork, thoroughly reviewing the codebase and making changes at https://github.com/behdad/fonttools to add new features and support for new font formats.
See "LICENSE.txt" for licensing information.
Have fun!
Just van Rossum just@letterror.com