Erik van Blokland 3646055ea2 initial import
git-svn-id: http://svn.robofab.com/trunk@1 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2008-01-07 17:40:34 +00:00

25 lines
697 B
Python

# robothon06
# demo of executing python in FontLab, MacOS only
# this script runs in the Python IDE
# it will send some python code to FontLab
# FontLab will execute the python code:
# it will find the current glyph and send it to our other script.
from robofab.tools.remote import runFontLabRemote, receiveGlyph
from robofab.world import RFont
# this is what we want FontLab to do:
pythonCode = """
from robofab.world import CurrentGlyph
from robofab.tools.remote import transmitGlyph
g = CurrentGlyph()
transmitGlyph(g)
"""
# this the font where we'll store the glyph from FontLab
destFont = RFont()
result = runFontLabRemote(pythonCode)
receiveGlyph(result, destFont)
print destFont.keys()