Skip to content

Instantly share code, notes, and snippets.

@roberto-arista
Created February 5, 2019 10:06
Show Gist options
  • Save roberto-arista/e916e3c9c0ab445b2bfb714af80dab6b to your computer and use it in GitHub Desktop.
Save roberto-arista/e916e3c9c0ab445b2bfb714af80dab6b to your computer and use it in GitHub Desktop.
import fontParts.world as fp
from fontTools.pens.cocoaPen import CocoaPen
def drawGlyph(glyph):
pen = CocoaPen(glyph.getParent())
glyph.draw(pen)
path = pen.path
glyphPath = BezierPath(path=path)
drawPath(glyphPath)
myFont = fp.OpenFont('someFont.ufo')
drawGlyph(myFont['a'])
@roberto-arista
Copy link
Author

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment