Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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'])
@typemytype
Copy link

typemytype commented Feb 5, 2019

import fontParts.world as fp

def drawGlyph(glyph):
    glyphPath = BezierPath(glyphSet=glyph.layer)
    glyph.draw(glyphPath)    
    drawPath(glyphPath)
    

myFont = fp.OpenFont('someFont.ufo')
drawGlyph(myFont['a'])

@roberto-arista
Copy link
Author

roberto-arista commented Feb 5, 2019

thanks!

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