Changeset 164


Ignore:
Timestamp:
02/20/09 03:49:43 (4 years ago)
Author:
tal
Message:

When converting font info from version 1 to version 2, try to quietly convert floats to ints if possible.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ufo2/Lib/robofab/ufoLib.py

    r161 r164  
    10031003        If the value is None, None will be returned for the new value. 
    10041004        """ 
     1005        # convert floats to ints if possible 
     1006        if isinstance(value, float): 
     1007                if int(value) == value: 
     1008                        value = int(value) 
    10051009        if value is not None: 
    10061010                if attr == "fontStyle": 
Note: See TracChangeset for help on using the changeset viewer.