Created
January 6, 2024 00:39
-
-
Save okay-type/64f4579bee049d7fd8ddf019070e5d3b to your computer and use it in GitHub Desktop.
Open Robofont scripting windows with preset code
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
from mojo.subscriber import Subscriber, registerRoboFontSubscriber | |
# set as a startup script | |
# open new scripting windows with preset code | |
# requires Robofont beta 2401051907 (5 January 2024) or later | |
# ok@ytyt.pe | |
preset = '''# a = AllFonts() | |
# f = CurrentFont() | |
# g = CurrentGlyph() | |
''' | |
class initial_script_placeholder(Subscriber): | |
debug = False | |
def scriptingWindowDidOpen(self, info): | |
info['window'].setText(preset) | |
registerRoboFontSubscriber(initial_script_placeholder) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment