Created
February 5, 2019 10:06
-
-
Save roberto-arista/e916e3c9c0ab445b2bfb714af80dab6b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks!