Skip to content

Instantly share code, notes, and snippets.

@typemytype
Last active August 29, 2015 13:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save typemytype/9507969 to your computer and use it in GitHub Desktop.
Save typemytype/9507969 to your computer and use it in GitHub Desktop.
from fontTools.pens.basePen import BasePen
class MyPen(BasePen):
def _moveTo(self, pt):
print "move to", pt
def _lineTo(self, pt):
print "line to", pt
def _curveToOne(self, pt1, pt2, pt3):
print "curve to", pt1, pt2, pt3
g = CurrentGlyph()
pen = MyPen(g.getParent())
g.draw(pen)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment