# Pick a UFO font: f = OpenFont() print "Number of contours before", len(f['A']) # call FontLab to make a new font startNewFontCode = """from robofab.world import NewFont f = NewFont() f.info.fullName = 'Temporary Font generated by RoboFab Remote'""" print runFontLabRemote(startNewFontCode) # send a glyph to FontLab, # it will be inserted in the CurrentFont. transmitGlyph(f['A']) f.removeGlyph('A') # send instructions to remove overlap for this glyph overlapCode = """from robofab.world import CurrentFont from robofab.tools.remote import transmitGlyph f = CurrentFont() f["A"].removeOverlap() f.update() transmitGlyph(f['A']) """ # send the code and catch the output x = runFontLabRemote(overlapCode) # interpret the output receiveGlyph(x, f)
from robofab.tools.remote import transmitGlyph # Pick a UFO font: f = OpenFont() # one to beam up, Scotty! transmitGlyph(f['n'])