commit | 2d67a188b1bef1b70b50b0862a19210d0d4c02f2 | [log] [tgz] |
---|---|---|
author | Behdad Esfahbod <behdad@behdad.org> | Thu Nov 28 18:08:36 2013 -0500 |
committer | Behdad Esfahbod <behdad@behdad.org> | Thu Nov 28 18:53:30 2013 -0500 |
tree | 4c68209dc093e4e4cc3fd91bf3fb1ef5b5141cc6 | |
parent | 4069b39047b44d083344150a3513f2eb9a82a765 [diff] |
py23 Add fixedTools: Smart fixedToFloat() and floatToFixed() Apparently Python 2 and Python 3 have different default print precisions for floats. Or at least with my build it is the case. As such, for example with amiri-regular.ttf I see these annoying differences in the ttx output of the two versions: 77203c77203 < <component ... scale="0.5999755859375" flags="0x1004"/> --- > <component ... scale="0.599975585938" flags="0x1004"/> That's just gross. Specially when these numbers are show to humans, while we know that's just 0.6. The fixedToFloat() routine in this module is smart enough to do that. Not used yet.
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.
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.
See "LICENSE.txt" for licensing information.
Have fun!
Just van Rossum just@letterror.com