2d67a188b1bef1b70b50b0862a19210d0d4c02f2 |
|
29-Nov-2013 |
Behdad Esfahbod <behdad@behdad.org> |
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.
/external/fonttools/Lib/fontTools/misc/fixedTools.py
|