Changeset 26

Show
Ignore:
Timestamp:
01/22/08 05:28:22 (4 years ago)
Author:
erik
Message:

Change to the way the transformation tuple of a component is added to the digest. Values which can be ints (int(a) == a) are added as int, rather than float. This solves a problem comparing digests in UFO and VFB.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/robofab/Lib/robofab/pens/digestPen.py

    r1 r26  
    3030 
    3131        def addComponent(self, baseGlyphName, transformation): 
    32                 self._data.append((baseGlyphName, tuple(transformation))) 
     32                t = [] 
     33                for v in transformation: 
     34                        if int(v) == v: 
     35                                t.append(int(v)) 
     36                        else: 
     37                                t.append(v) 
     38                self._data.append((baseGlyphName, tuple(t))) 
    3339 
    3440        def getDigest(self):