robofab.pens.adapterPens
index
/code/projects/robofab/Lib/robofab/pens/adapterPens.py

 
Modules
       
math

 
Classes
       
fontTools.pens.basePen.AbstractPen
SegmentToPointPen
robofab.pens.pointPen.AbstractPointPen
GuessSmoothPointPen
TransformPointPen
robofab.pens.pointPen.BasePointToSegmentPen(robofab.pens.pointPen.AbstractPointPen)
PointToSegmentPen
FabToFontToolsPenAdapter

 
class FabToFontToolsPenAdapter
    Class that covers up the subtle differences between RoboFab
Pens and FontTools Pens. 'Fab should eventually move to FontTools
Pens, this class may help to make the transition smoother.
 
  Methods defined here:
__init__(self, fontToolsPen)
addAnchor(self, name, pt)
addComponent(self, glyphName, offset=(0, 0), scale=(1, 1))
closePath(self)
curveTo(self, *pts, **kargs)
doneDrawing(self)
endPath(self)
lineTo(self, pt, **kargs)
moveTo(self, pt, **kargs)
qCurveTo(self, *pts, **kargs)
setNote(self, note)
setWidth(self, width)

 
class GuessSmoothPointPen(robofab.pens.pointPen.AbstractPointPen)
    Filtering PointPen that tries to determine whether an on-curve point
should be "smooth", ie. that it's a "tangent" point or a "curve" point.
 
  Methods defined here:
__init__(self, outPen)
addComponent(self, glyphName, transformation)
addPoint(self, pt, segmentType=None, smooth=False, name=None, **kwargs)
beginPath(self)
endPath(self)

 
class PointToSegmentPen(robofab.pens.pointPen.BasePointToSegmentPen)
    Adapter class that converts the PointPen protocol to the
(Segment)Pen protocol.
 
 
Method resolution order:
PointToSegmentPen
robofab.pens.pointPen.BasePointToSegmentPen
robofab.pens.pointPen.AbstractPointPen

Methods defined here:
__init__(self, segmentPen, outputImpliedClosingLine=False)
addComponent(self, glyphName, transform)

Methods inherited from robofab.pens.pointPen.BasePointToSegmentPen:
addPoint(self, pt, segmentType=None, smooth=False, name=None, **kwargs)
beginPath(self)
endPath(self)

 
class SegmentToPointPen(fontTools.pens.basePen.AbstractPen)
    Adapter class that converts the (Segment)Pen protocol to the
PointPen protocol.
 
  Methods defined here:
__init__(self, pointPen, guessSmooth=True)
addComponent(self, glyphName, transform)
closePath(self)
curveTo(self, *pts)
endPath(self)
lineTo(self, pt)
moveTo(self, pt)
qCurveTo(self, *pts)

 
class TransformPointPen(robofab.pens.pointPen.AbstractPointPen)
    PointPen that transforms all coordinates, and passes them to another
PointPen. It also transforms the transformation given to addComponent().
 
  Methods defined here:
__init__(self, outPen, transformation)
addComponent(self, glyphName, transformation)
addPoint(self, pt, segmentType=None, smooth=False, name=None, **kwargs)
beginPath(self)
endPath(self)