robofab.objects.objectsBase
index
/code/projects/robofab/Lib/robofab/objects/objectsBase.py

Base classes for the Unified Font Objects (UFO),
a series of classes that deal with fonts, glyphs,
contours and related things.
 
Unified Font Objects are:
- platform independent
- application independent
 
About Object Inheritance:
objectsFL and objectsRF objects inherit
methods and attributes from these objects.
In other words, if it is in here, you can
do it with the objectsFL and objectsRF.

 
Modules
       
copy
math

 
Classes
       
exceptions.Exception
RoboFabInterpolationError
__builtin__.dict(__builtin__.object)
BaseGroups
BaseLib
__builtin__.object
FuzzyNumber
RBaseObject
BaseAnchor
BaseBPoint
BaseComponent
BaseContour
BaseFont
BaseGlyph
BaseGuide
BaseInfo
BaseKerning
BasePoint
BaseSegment

 
class BaseAnchor(RBaseObject)
    Base class for all anchor point objects.
 
 
Method resolution order:
BaseAnchor
RBaseObject
__builtin__.object

Methods defined here:
__add__(self, other)
__init__(self)
__mul__(self, factor)
__repr__(self)
__rmul__ = __mul__(self, factor)
__sub__(self, other)
copy(self, aParent=None)
Duplicate this anchor.
draw(self, pen)
Draw the object onto a segment pen
drawPoints(self, pen)
draw the object with a point pen
move(self, (x, y))
Move the anchor
round(self)
round the values in the anchor
scale(self, (x, y), center=(0, 0))
scale the anchor
transform(self, matrix)
Transform this anchor. Use a Transform matrix
object from fontTools.misc.transform

Methods inherited from RBaseObject:
__len__(self)
dump(self, private=False)
Print a dump of this object to the std out.
getParent(self)
this method will be overwritten with a weakref if there is a parent.
isRobofab(self)
Presence of this method indicates a Robofab object
naked(self)
Return the wrapped object itself, in case it is needed for direct access.
setChanged(self, state=True)
setParent(self, parent)

Data and other attributes inherited from RBaseObject:
__dict__ = <dictproxy object at 0x129c710>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
list of weak references to the object (if defined)
attrMap = {}

 
class BaseBPoint(RBaseObject)
    Base class for bPoints objects.
 
 
Method resolution order:
BaseBPoint
RBaseObject
__builtin__.object

Methods defined here:
__add__(self, other)
__init__(self)
__mul__(self, factor)
__repr__(self)
__rmul__ = __mul__(self, factor)
__sub__(self, other)
move(self, (x, y))
move the bPoint
round(self)
Round the coordinates to integers
scale(self, (x, y), center=(0, 0))
scale the bPoint
select(self, state=True)
Set the selection of this point.
XXXX This method should be a lot more versatile, dealing with
different kinds of selection, select the bcp's seperately etc.
But that's for later when we need it more. For now it's just 
one flag for the entire thing.
transform(self, matrix)
Transform this point. Use a Transform matrix
object from fontTools.misc.transform

Properties defined here:
anchor
the position of the anchor
get = _get_anchor(self)
set = _set_anchor(self, value)
bcpIn
the (x,y) for the incoming bcp
get = _get_bcpIn(self)
set = _set_bcpIn(self, value)
bcpOut
the (x,y) for the outgoing bcp
get = _get_bcpOut(self)
set = _set_bcpOut(self, value)
type
the type of bPoint, either 'corner' or 'curve'
get = _get_type(self)
set = _set_type(self, pointType)

Methods inherited from RBaseObject:
__len__(self)
copy(self, aParent=None)
Duplicate this object. Pass an object for parenting if you want.
dump(self, private=False)
Print a dump of this object to the std out.
getParent(self)
this method will be overwritten with a weakref if there is a parent.
isRobofab(self)
Presence of this method indicates a Robofab object
naked(self)
Return the wrapped object itself, in case it is needed for direct access.
setChanged(self, state=True)
setParent(self, parent)

Data and other attributes inherited from RBaseObject:
__dict__ = <dictproxy object at 0x129c710>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
list of weak references to the object (if defined)
attrMap = {}

 
class BaseComponent(RBaseObject)
    Base class for all component objects.
 
 
Method resolution order:
BaseComponent
RBaseObject
__builtin__.object

Methods defined here:
__add__(self, other)
__init__(self)
__mul__(self, factor)
__repr__(self)
__rmul__ = __mul__(self, factor)
__sub__(self, other)
copy(self, aParent=None)
Duplicate this component.
draw(self, pen)
Segment pen drawing method.
drawPoints(self, pen)
draw the object with a point pen
round(self)
round the offset values

Properties defined here:
box
the bounding box of the component: (xMin, yMin, xMax, yMax)
get = _get_box(self)

Methods inherited from RBaseObject:
__len__(self)
dump(self, private=False)
Print a dump of this object to the std out.
getParent(self)
this method will be overwritten with a weakref if there is a parent.
isRobofab(self)
Presence of this method indicates a Robofab object
naked(self)
Return the wrapped object itself, in case it is needed for direct access.
setChanged(self, state=True)
setParent(self, parent)

Data and other attributes inherited from RBaseObject:
__dict__ = <dictproxy object at 0x129c690>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
list of weak references to the object (if defined)
attrMap = {}

 
class BaseContour(RBaseObject)
    Base class for all contour objects.
 
 
Method resolution order:
BaseContour
RBaseObject
__builtin__.object

Methods defined here:
__add__(self, other)
__getitem__(self, index)
__init__(self)
__len__(self)
__mul__(self, factor)
__repr__(self)
__rmul__ = __mul__(self, factor)
__sub__(self, other)
appendBPoint(self, pointType, anchor, bcpIn=(0, 0), bcpOut=(0, 0))
append a bPoint to the contour
autoStartSegment(self)
automatically set the lower left point of the contour as the first point.
copy(self, aParent=None)
Duplicate this contour
draw(self, pen)
draw the object with a fontTools pen
drawPoints(self, pen)
draw the object with a point pen
insertBPoint(self, index, pointType, anchor, bcpIn=(0, 0), bcpOut=(0, 0))
insert a bPoint at index on the contour
move(self, (x, y))
move the contour
pointInside(self, (x, y), evenOdd=0)
determine if the point is inside or ouside of the contour
rotate(self, angle, offset=None)
rotate the contour
round(self)
round the value of all points in the contour
scale(self, (x, y), center=(0, 0))
scale the contour
skew(self, angle, offset=None)
skew the contour
transform(self, matrix)
Transform this contour.
Use a Transform matrix object from
robofab.transform

Properties defined here:
box
the bounding box for the contour
get = _get_box(self)
clockwise
direction of contour: 1=clockwise 0=counterclockwise
get = _get_clockwise(self)
set = _set_clockwise(self, value)

Methods inherited from RBaseObject:
dump(self, private=False)
Print a dump of this object to the std out.
getParent(self)
this method will be overwritten with a weakref if there is a parent.
isRobofab(self)
Presence of this method indicates a Robofab object
naked(self)
Return the wrapped object itself, in case it is needed for direct access.
setChanged(self, state=True)
setParent(self, parent)

Data and other attributes inherited from RBaseObject:
__dict__ = <dictproxy object at 0x129c6b0>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
list of weak references to the object (if defined)
attrMap = {}

 
class BaseFont(RBaseObject)
    Base class for all font objects.
 
 
Method resolution order:
BaseFont
RBaseObject
__builtin__.object

Methods defined here:
__eq__(self, other)
__getitem__(self, glyphName)
__init__(self)
__iter__(self)
__repr__(self)
autoUnicodes(self)
Using fontTools.agl, assign Unicode lists to all glyphs in the font
close(self, save=1)
Close the font, saving is optional.
compileGlyph(self, glyphName, baseName, accentNames, adjustWidth=False, preflight=False, printErrors=True)
Compile components into a new glyph using components and anchorpoints.
font: the font
glyphName: the name of the glyph where it all needs to go
baseName: the name of the base glyph
accentNames: a list of accentName, anchorName tuples, [('acute', 'top'), etc]
generateGlyph(self, glyphName, replace=1, preflight=False, printErrors=True)
Generate a glyph and return it. Assembled from GlyphConstruction.txt
getCharacterMapping(self)
Create a dictionary of unicode -> [glyphname, ...] mappings.
Note that this dict is created each time this method is called, 
which can make it expensive for larger fonts. All glyphs are loaded.
Note that one glyph can have multiple unicode values,
and a unicode value can have multiple glyphs pointing to it.
getGlyphNameToFileNameFunc(self)
getReverseComponentMapping(self)
Get a reversed map of component references in the font.
{
'A' : ['Aacute', 'Aring']
'acute' : ['Aacute']
'ring' : ['Aring']
etc.
}
interpolate(self, factor, minFont, maxFont, suppressError=True, analyzeOnly=False, doProgress=False)
Traditional interpolation method. Interpolates by factor between minFont and maxFont.
suppressError will supress all tracebacks and analyze only will not perform the interpolation
but it will analyze all glyphs and return a dict of problems.
keys(self)
round(self)
round all of the points in all of the glyphs
update(self)
update the font

Class methods defined here:
getAllFonts(cls) from __builtin__.type
Return a list of all instances of this class (or its subclasses)
that are currently alive.

Methods inherited from RBaseObject:
__len__(self)
copy(self, aParent=None)
Duplicate this object. Pass an object for parenting if you want.
dump(self, private=False)
Print a dump of this object to the std out.
getParent(self)
this method will be overwritten with a weakref if there is a parent.
isRobofab(self)
Presence of this method indicates a Robofab object
naked(self)
Return the wrapped object itself, in case it is needed for direct access.
setChanged(self, state=True)
setParent(self, parent)

Data and other attributes inherited from RBaseObject:
__dict__ = <dictproxy object at 0x129c730>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
list of weak references to the object (if defined)
attrMap = {}

 
class BaseGlyph(RBaseObject)
    Base class for all glyph objects.
 
 
Method resolution order:
BaseGlyph
RBaseObject
__builtin__.object

Methods defined here:
__add__(self, other)
__div__(self, factor)
__eq__(self, other)
__init__(self)
__mul__(self, factor)
__repr__(self)
__rmul__ = __mul__(self, factor)
__sub__(self, other)
appendContour(self, aContour, offset=(0, 0))
append a contour to the glyph
appendGlyph(self, aGlyph, offset=(0, 0))
append another glyph to the glyph
autoContourOrder(self)
attempt to sort the contours based on their centers
autoUnicodes(self)
Using fontTools.agl, assign Unicode list to the glyph
copy(self, aParent=None)
Duplicate this glyph
correctDirection(self, trueType=False)
corect the direction of the contours in the glyph.
deSelect(self)
Set all selected attrs in glyph to False: for the glyph, components, anchors, points.
draw(self, pen)
draw the object with a RoboFab segment pen
drawPoints(self, pen)
draw the object with a point pen
getGlyph(self, glyphName)
Provided there is a font parent for this glyph, return a sibling glyph.
getPen(self)
Return a Pen object for creating an outline in this glyph.
getPointPen(self)
Return a PointPen object for creating an outline in this glyph.
interpolate(self, factor, minGlyph, maxGlyph, suppressError=True, analyzeOnly=False)
Traditional interpolation method. Interpolates by factor between minGlyph and maxGlyph.
suppressError will supress all tracebacks and analyze only will not perform the interpolation
but it will analyze all glyphs and return a dict of problems.
isCompatible(self, otherGlyph, report=True)
Return a bool value if the glyph is compatible with otherGlyph.
With report = True, isCompatible will return a report of what's wrong.
The interpolate method requires absolute equality between contour data.
Absolute equality is preferred among component and anchor data, but
it is NOT required. Interpolation between components and anchors
will only deal with compatible data and incompatible data will be
ignored. This method reflects this system.
isEmpty(self)
return true if the glyph has no contours or components
move(self, (x, y), contours=True, components=True, anchors=True)
Move a glyph's items that are flagged as True
pointInside(self, (x, y), evenOdd=0)
determine if the point is in the black or white of the glyph
rasterize(self, cellSize=50, xMin=None, yMin=None, xMax=None, yMax=None)
Slice the glyph into a grid based on the cell size.
It returns a list of lists containing bool values
that indicate the black (True) or white (False)
value of that particular cell.  These lists are
arranged from top to bottom of the glyph and
proceed from left to right.
This is an expensive operation!
rotate(self, angle, offset=None)
rotate the glyph
round(self)
round all coordinates in all contours, components and anchors
scale(self, (x, y), center=(0, 0))
scale the glyph
skew(self, angle, offset=None)
skew the glyph
transform(self, matrix)
Transform this glyph.
Use a Transform matrix object from
robofab.transform
update(self)
update the glyph

Properties defined here:
box
the bounding box of the glyph: (xMin, yMin, xMax, yMax)
get = _get_box(self)
leftMargin
the left margin
get = _get_leftMargin(self)
set = _set_leftMargin(self, value)
rightMargin
the right margin
get = _get_rightMargin(self)
set = _set_rightMargin(self, value)

Methods inherited from RBaseObject:
__len__(self)
dump(self, private=False)
Print a dump of this object to the std out.
getParent(self)
this method will be overwritten with a weakref if there is a parent.
isRobofab(self)
Presence of this method indicates a Robofab object
naked(self)
Return the wrapped object itself, in case it is needed for direct access.
setChanged(self, state=True)
setParent(self, parent)

Data and other attributes inherited from RBaseObject:
__dict__ = <dictproxy object at 0x129cc70>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
list of weak references to the object (if defined)
attrMap = {}

 
class BaseGroups(__builtin__.dict)
    Base class for all RFont.groups objects
 
 
Method resolution order:
BaseGroups
__builtin__.dict
__builtin__.object

Methods defined here:
__init__(self)
__repr__(self)
__setitem__(self, key, value)
findGlyph(self, glyphName)
return a list of all groups contianing glyphName
getParent(self)
this method will be overwritten with a weakref if there is a parent.
setParent(self, parent)

Data and other attributes defined here:
__dict__ = <dictproxy object at 0x129cdf0>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'BaseGroups' objects>
list of weak references to the object (if defined)

Methods inherited from __builtin__.dict:
__cmp__(...)
x.__cmp__(y) <==> cmp(x,y)
__contains__(...)
x.__contains__(y) <==> y in x
__delitem__(...)
x.__delitem__(y) <==> del x[y]
__eq__(...)
x.__eq__(y) <==> x==y
__ge__(...)
x.__ge__(y) <==> x>=y
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__gt__(...)
x.__gt__(y) <==> x>y
__hash__(...)
x.__hash__() <==> hash(x)
__iter__(...)
x.__iter__() <==> iter(x)
__le__(...)
x.__le__(y) <==> x<=y
__len__(...)
x.__len__() <==> len(x)
__lt__(...)
x.__lt__(y) <==> x<y
__ne__(...)
x.__ne__(y) <==> x!=y
clear(...)
D.clear() -> None.  Remove all items from D.
copy(...)
D.copy() -> a shallow copy of D
get(...)
D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None.
has_key(...)
D.has_key(k) -> True if D has a key k, else False
items(...)
D.items() -> list of D's (key, value) pairs, as 2-tuples
iteritems(...)
D.iteritems() -> an iterator over the (key, value) items of D
iterkeys(...)
D.iterkeys() -> an iterator over the keys of D
itervalues(...)
D.itervalues() -> an iterator over the values of D
keys(...)
D.keys() -> list of D's keys
pop(...)
D.pop(k[,d]) -> v, remove specified key and return the corresponding value
If key is not found, d is returned if given, otherwise KeyError is raised
popitem(...)
D.popitem() -> (k, v), remove and return some (key, value) pair as a
2-tuple; but raise KeyError if D is empty
setdefault(...)
D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
update(...)
D.update(E) -> None.  Update D from E: for k in E.keys(): D[k] = E[k]
values(...)
D.values() -> list of D's values

Data and other attributes inherited from __builtin__.dict:
__new__ = <built-in method __new__ of type object at 0xa866d054>
T.__new__(S, ...) -> a new object with type S, a subtype of T
fromkeys = <built-in method fromkeys of type object at 0x3201e0>
dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v.
v defaults to None.

 
class BaseGuide(RBaseObject)
    Base class for all guide objects.
 
 
Method resolution order:
BaseGuide
RBaseObject
__builtin__.object

Methods defined here:
__init__(self)

Methods inherited from RBaseObject:
__len__(self)
__repr__(self)
copy(self, aParent=None)
Duplicate this object. Pass an object for parenting if you want.
dump(self, private=False)
Print a dump of this object to the std out.
getParent(self)
this method will be overwritten with a weakref if there is a parent.
isRobofab(self)
Presence of this method indicates a Robofab object
naked(self)
Return the wrapped object itself, in case it is needed for direct access.
round(self)
setChanged(self, state=True)
setParent(self, parent)

Data and other attributes inherited from RBaseObject:
__dict__ = <dictproxy object at 0x129cd90>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
list of weak references to the object (if defined)
attrMap = {}

 
class BaseInfo(RBaseObject)
    Base class for all font.info objects.
 
 
Method resolution order:
BaseInfo
RBaseObject
__builtin__.object

Methods defined here:
__init__(self)
__repr__(self)
autoNaming(self, familyName=None, styleName=None)
Automatically set the font naming info based on family and style names.

Properties defined here:
ascender
ascender value
get = _get_ascender(self)
set = _set_ascender(self, value)
capHeight
cap height value
get = _get_capHeight(self)
set = _set_capHeight(self, value)
copyright
copyright
get = _get_copyright(self)
set = _set_copyright(self, value)
createdBy
source
get = _get_createdBy(self)
set = _set_createdBy(self, value)
defaultWidth
default width value
get = _get_defaultWidth(self)
set = _set_defaultWidth(self, value)
descender
descender value
get = _get_descender(self)
set = _set_descender(self, value)
designer
designer
get = _get_designer(self)
set = _set_designer(self, value)
designerURL
designer url
get = _get_designerURL(self)
set = _set_designerURL(self, value)
familyName
family name
get = _get_familyName(self)
set = _set_familyName(self, value)
fondID
fond id number
get = _get_fondID(self)
set = _set_fondID(self, value)
fondName
fond name
get = _get_fondName(self)
set = _set_fondName(self, value)
fontName
font name
get = _get_fontName(self)
set = _set_fontName(self, value)
fontStyle
font style
get = _get_fontStyle(self)
set = _set_fontStyle(self, value)
fullName
full name
get = _get_fullName(self)
set = _set_fullName(self, value)
italicAngle
italic_angle
get = _get_italicAngle(self)
set = _set_italicAngle(self, value)
license
license
get = _get_license(self)
set = _set_license(self, value)
licenseURL
license url
get = _get_licenseURL(self)
set = _set_licenseURL(self, value)
menuName
menu name
get = _get_menuName(self)
set = _set_menuName(self, value)
msCharSet
ms charset
get = _get_msCharSet(self)
set = _set_msCharSet(self, value)
note
note
get = _get_note(self)
set = _set_note(self, value)
notice
notice
get = _get_notice(self)
set = _set_notice(self, value)
otFamilyName
OpenType family name
get = _get_otFamilyName(self)
set = _set_otFamilyName(self, value)
otMacName
Mac specific OpenType name
get = _get_otMacName(self)
set = _set_otMacName(self, value)
otStyleName
OpenType style name
get = _get_otStyleName(self)
set = _set_otStyleName(self, value)
slantAngle
slant_angle
get = _get_slantAngle(self)
set = _set_slantAngle(self, value)
styleName
style name
get = _get_styleName(self)
set = _set_styleName(self, value)
trademark
trademark
get = _get_trademark(self)
set = _set_trademark(self, value)
ttUniqueID
TrueType unique id number
get = _get_ttUniqueID(self)
set = _set_ttUniqueID(self, value)
ttVendor
vendor
get = _get_ttVendor(self)
set = _set_ttVendor(self, value)
ttVersion
TrueType version
get = _get_ttVersion(self)
set = _set_ttVersion(self, value)
uniqueID
unique id number
get = _get_uniqueID(self)
set = _set_uniqueID(self, value)
unitsPerEm
unitsPerEm value
get = _get_unitsPerEm(self)
set = _set_unitsPerEm(self)
vendorURL
vendor url
get = _get_vendorURL(self)
set = _set_vendorURL(self, value)
versionMajor
version major
get = _get_versionMajor(self)
set = _set_versionMajor(self, value)
versionMinor
version minor
get = _get_versionMinor(self)
set = _set_versionMinor(self, value)
weightName
weight name
get = _get_weightName(self)
set = _set_weightName(self, value)
weightValue
weight value
get = _get_weightValue(self)
set = _set_weightValue(self, value)
widthName
width name
get = _get_widthName(self)
set = _set_widthName(self, value)
xHeight
x height value
get = _get_xHeight(self)
set = _set_xHeight(self, value)
year
year
get = _get_year(self)
set = _set_year(self, value)

Methods inherited from RBaseObject:
__len__(self)
copy(self, aParent=None)
Duplicate this object. Pass an object for parenting if you want.
dump(self, private=False)
Print a dump of this object to the std out.
getParent(self)
this method will be overwritten with a weakref if there is a parent.
isRobofab(self)
Presence of this method indicates a Robofab object
naked(self)
Return the wrapped object itself, in case it is needed for direct access.
round(self)
setChanged(self, state=True)
setParent(self, parent)

Data and other attributes inherited from RBaseObject:
__dict__ = <dictproxy object at 0x129c510>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
list of weak references to the object (if defined)
attrMap = {}

 
class BaseKerning(RBaseObject)
    Base class for all kerning objects. Object behaves like a dict but has
some special kerning specific tricks.
 
 
Method resolution order:
BaseKerning
RBaseObject
__builtin__.object

Methods defined here:
__add__(self, other)
__div__(self, factor)
__getitem__(self, key)
__init__(self, kerningDict=None)
__len__(self)
__mul__(self, factor)
__repr__(self)
__rmul__ = __mul__(self, factor)
__setitem__(self, pair, value)
__sub__(self, other)
add(self, value)
add value to all kerning pairs
asDict(self, returnIntegers=True)
return the object as a dictionary
clear(self)
clear all kerning
combine(self, kerningDicts, overwriteExisting=True)
combine two or more kerning dictionaries.
overwrite exsisting duplicate pairs if overwriteExisting=True
eliminate(self, leftGlyphsToEliminate=None, rightGlyphsToEliminate=None, analyzeOnly=False)
eliminate pairs containing a left glyph that is in the leftGlyphsToEliminate list
or a right glyph that is in the rightGlyphsToELiminate list.
sideGlyphsToEliminate can be a string: 'a' or list: ['a', 'b'].
analyzeOnly will not remove pairs. it will return a count
of all pairs that would be removed.
explodeClasses(self, leftClassDict=None, rightClassDict=None, analyzeOnly=False)
turn class kerns into real kerning pairs. classes should
be defined in dicts: {'O':['C', 'G', 'Q'], 'H':['B', 'D', 'E', 'F', 'I']}.
analyzeOnly will not remove pairs. it will return a count
of all pairs that would be added
get(self, pair, default=None)
get a value. return None if the pair does not exist
getAverage(self)
return average of all kerning pairs
getExtremes(self)
return the lowest and highest kerning values
getLeft(self, glyphName)
Return a list of kerns with glyphName as left character.
getRight(self, glyphName)
Return a list of kerns with glyphName as left character.
has_key(self, pair)
implodeClasses(self, leftClassDict=None, rightClassDict=None, analyzeOnly=False)
condense the number of kerning pairs by applying classes.
this will eliminate all pairs containg the classed glyphs leaving
pairs that contain the key glyphs behind. analyzeOnly will not
remove pairs. it will return a count of all pairs that would be removed.
importAFM(self, path, clearExisting=True)
Import kerning pairs from an AFM file. clearExisting=True will
clear all exising kerning
interpolate(self, sourceDictOne, sourceDictTwo, value, clearExisting=True)
interpolate the kerning between sourceDictOne
and sourceDictTwo. clearExisting will clear existing
kerning first.
items(self)
return a list of kerning items
keys(self)
return list of kerning pairs
minimize(self, minimum=10)
eliminate pairs with value less than minimum
occurrenceCount(self, glyphsToCount)
return a dict with glyphs as keys and the number of 
occurances of that glyph in the kerning pairs as the value
glyphsToCount can be a string: 'a' or list: ['a', 'b']
remove(self, pair)
remove a kerning pair
round(self, multiple=10)
round the kerning pair values to increments of multiple
scale(self, value)
scale all kernng pairs by value
swapNames(self, swapTable)
change glyph names in all kerning pairs based on swapTable.
swapTable = {'BeforeName':'AfterName', ...}
update(self, kerningDict)
replace kerning data with the data in the given kerningDict
values(self)
return a list of kerning values

Methods inherited from RBaseObject:
copy(self, aParent=None)
Duplicate this object. Pass an object for parenting if you want.
dump(self, private=False)
Print a dump of this object to the std out.
getParent(self)
this method will be overwritten with a weakref if there is a parent.
isRobofab(self)
Presence of this method indicates a Robofab object
naked(self)
Return the wrapped object itself, in case it is needed for direct access.
setChanged(self, state=True)
setParent(self, parent)

Data and other attributes inherited from RBaseObject:
__dict__ = <dictproxy object at 0x129c7d0>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
list of weak references to the object (if defined)
attrMap = {}

 
class BaseLib(__builtin__.dict)
    Base class for all lib objects
 
 
Method resolution order:
BaseLib
__builtin__.dict
__builtin__.object

Methods defined here:
__init__(self)
__repr__(self)
copy(self, aParent=None)
Duplicate this lib.
getParent(self)
this method will be overwritten with a weakref if there is a parent.
setParent(self, parent)

Data and other attributes defined here:
__dict__ = <dictproxy object at 0x129c5f0>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'BaseLib' objects>
list of weak references to the object (if defined)

Methods inherited from __builtin__.dict:
__cmp__(...)
x.__cmp__(y) <==> cmp(x,y)
__contains__(...)
x.__contains__(y) <==> y in x
__delitem__(...)
x.__delitem__(y) <==> del x[y]
__eq__(...)
x.__eq__(y) <==> x==y
__ge__(...)
x.__ge__(y) <==> x>=y
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__gt__(...)
x.__gt__(y) <==> x>y
__hash__(...)
x.__hash__() <==> hash(x)
__iter__(...)
x.__iter__() <==> iter(x)
__le__(...)
x.__le__(y) <==> x<=y
__len__(...)
x.__len__() <==> len(x)
__lt__(...)
x.__lt__(y) <==> x<y
__ne__(...)
x.__ne__(y) <==> x!=y
__setitem__(...)
x.__setitem__(i, y) <==> x[i]=y
clear(...)
D.clear() -> None.  Remove all items from D.
get(...)
D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None.
has_key(...)
D.has_key(k) -> True if D has a key k, else False
items(...)
D.items() -> list of D's (key, value) pairs, as 2-tuples
iteritems(...)
D.iteritems() -> an iterator over the (key, value) items of D
iterkeys(...)
D.iterkeys() -> an iterator over the keys of D
itervalues(...)
D.itervalues() -> an iterator over the values of D
keys(...)
D.keys() -> list of D's keys
pop(...)
D.pop(k[,d]) -> v, remove specified key and return the corresponding value
If key is not found, d is returned if given, otherwise KeyError is raised
popitem(...)
D.popitem() -> (k, v), remove and return some (key, value) pair as a
2-tuple; but raise KeyError if D is empty
setdefault(...)
D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
update(...)
D.update(E) -> None.  Update D from E: for k in E.keys(): D[k] = E[k]
values(...)
D.values() -> list of D's values

Data and other attributes inherited from __builtin__.dict:
__new__ = <built-in method __new__ of type object at 0xa866d054>
T.__new__(S, ...) -> a new object with type S, a subtype of T
fromkeys = <built-in method fromkeys of type object at 0x320530>
dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v.
v defaults to None.

 
class BasePoint(RBaseObject)
    Base class for point objects.
 
 
Method resolution order:
BasePoint
RBaseObject
__builtin__.object

Methods defined here:
__add__(self, other)
__init__(self)
__mul__(self, factor)
__repr__(self)
__rmul__ = __mul__(self, factor)
__sub__(self, other)
copy(self, aParent=None)
Duplicate this point
move(self, (x, y))
Move the point
round(self)
round the values in the point
scale(self, (x, y), center=(0, 0))
scale the point
select(self, state=True)
Set the selection of this point.
XXXX This method should be a lot more versatile, dealing with
different kinds of selection, select the bcp's seperately etc.
But that's for later when we need it more. For now it's just 
one flag for the entire thing.
transform(self, matrix)
Transform this point. Use a Transform matrix
object from fontTools.misc.transform

Methods inherited from RBaseObject:
__len__(self)
dump(self, private=False)
Print a dump of this object to the std out.
getParent(self)
this method will be overwritten with a weakref if there is a parent.
isRobofab(self)
Presence of this method indicates a Robofab object
naked(self)
Return the wrapped object itself, in case it is needed for direct access.
setChanged(self, state=True)
setParent(self, parent)

Data and other attributes inherited from RBaseObject:
__dict__ = <dictproxy object at 0x129c850>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
list of weak references to the object (if defined)
attrMap = {}

 
class BaseSegment(RBaseObject)
    Base class for all segment objects
 
 
Method resolution order:
BaseSegment
RBaseObject
__builtin__.object

Methods defined here:
__add__(self, other)
__init__(self)
__mul__(self, factor)
__repr__(self)
__rmul__ = __mul__(self, factor)
__sub__(self, other)
copy(self, aParent=None)
Duplicate this segment
move(self, (x, y))
move the segment
round(self)
round all points in the segment
scale(self, (x, y), center=(0, 0))
scale the segment
transform(self, matrix)
Transform this segment.
Use a Transform matrix object from
robofab.transform

Properties defined here:
offCurve
on curve point for the segment
get = _get_offCurve(self)
onCurve
list of off curve points for the segment
get = _get_onCurve(self)

Methods inherited from RBaseObject:
__len__(self)
dump(self, private=False)
Print a dump of this object to the std out.
getParent(self)
this method will be overwritten with a weakref if there is a parent.
isRobofab(self)
Presence of this method indicates a Robofab object
naked(self)
Return the wrapped object itself, in case it is needed for direct access.
setChanged(self, state=True)
setParent(self, parent)

Data and other attributes inherited from RBaseObject:
__dict__ = <dictproxy object at 0x129ca50>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
list of weak references to the object (if defined)
attrMap = {}

 
class FuzzyNumber(__builtin__.object)
     Methods defined here:
__cmp__(self, other)
__init__(self, value, threshold)

Data and other attributes defined here:
__dict__ = <dictproxy object at 0x129ca30>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'FuzzyNumber' objects>
list of weak references to the object (if defined)

 
class RBaseObject(__builtin__.object)
    Base class for wrapper objects
 
  Methods defined here:
__init__(self)
__len__(self)
__repr__(self)
copy(self, aParent=None)
Duplicate this object. Pass an object for parenting if you want.
dump(self, private=False)
Print a dump of this object to the std out.
getParent(self)
this method will be overwritten with a weakref if there is a parent.
isRobofab(self)
Presence of this method indicates a Robofab object
naked(self)
Return the wrapped object itself, in case it is needed for direct access.
round(self)
setChanged(self, state=True)
setParent(self, parent)

Data and other attributes defined here:
__dict__ = <dictproxy object at 0x129c950>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'RBaseObject' objects>
list of weak references to the object (if defined)
attrMap = {}

 
class RoboFabInterpolationError(exceptions.Exception)
     Methods inherited from exceptions.Exception:
__getitem__(...)
__init__(...)
__str__(...)

 
Functions
       
absoluteBCPIn(anchor, BCPIn)
convert relative incoming bcp value to an absolute value
absoluteBCPOut(anchor, BCPOut)
convert relative outgoing bcp value to an absolute value
addPt(ptA, ptB)
Add two vectors
mulPt(ptA, scalar)
Multiply a vector with scalar
relativeBCPIn(anchor, BCPIn)
convert absolute incoming bcp value to a relative value
relativeBCPOut(anchor, BCPOut)
convert absolute outgoing bcp value to a relative value
roundPt((x, y))
Round a vector
subPt(ptA, ptB)
Substract two vectors

 
Data
        CORNER = 'corner'
CURVE = 'curve'
DEGREE = 57.295779513082323
LINE = 'line'
MOVE = 'move'
OFFCURVE = 'offcurve'
QCURVE = 'qcurve'
generators = _Feature((2, 2, 0, 'alpha', 1), (2, 3, 0, 'final', 0), 4096)