Drawing glyphs from ufo file.
RafalBuchner last edited by gferreira
how to draw glyph of a UFO file in DrawBot outside RoboFont?
So far I came up with this solution, but I don't know what to do next:
from fontParts.world import * basepath = os.path.dirname(__file__) filepath = os.path.abspath(os.path.join(basepath, "..", "..", "UFOS/typeface-regular.ufo")) f = OpenFont(filepath) for g in f: newPage(1000,1000) p = g.getPen() # I don't know what should I put here
drawGlyph(g)doesn't work, and I imagine, that it should work only inside of RoboFont.
Thanks for the help in advance
benedikt last edited by
Until this is integrated in the standalone version of Drawbot (fingers crossed), you could have a look at how drawGlyph() is defined within the RF Extension and reuse some of the code for your script.
justvanrossum last edited by
@rafalbuchner This should work:
def drawGlyph(g): bez = BezierPath() g.draw(bez) drawPath(bez)
RafalBuchner last edited by
Delayed, but still: thanks guys !!!