Skip to content

Instantly share code, notes, and snippets.

@typemytype
Created April 25, 2016 13:14
Show Gist options
  • Select an option

  • Save typemytype/9bd6c0321bca40928e51b8535157d657 to your computer and use it in GitHub Desktop.

Select an option

Save typemytype/9bd6c0321bca40928e51b8535157d657 to your computer and use it in GitHub Desktop.
intersection
from mojo.tools import IntersectGlyphWithLine
# get the current glypyh
g = CurrentGlyph()
# intersect the glyph with a line
# it will return a list with all intersection points
print IntersectGlyphWithLine(g, ((0, 200), (600, 200)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment