Skip to content

Instantly share code, notes, and snippets.

@okay-type
Last active October 20, 2025 19:02
Show Gist options
  • Select an option

  • Save okay-type/e537e6fd2a400c9333dbbb9a66b8e521 to your computer and use it in GitHub Desktop.

Select an option

Save okay-type/e537e6fd2a400c9333dbbb9a66b8e521 to your computer and use it in GitHub Desktop.
Force MacOS to open your Robofont Glyph Edit window at a specific position and size
from mojo.subscriber import Subscriber, registerRoboFontSubscriber
class glyph_window_position_fix(Subscriber):
def glyphEditorWillOpen(self, info):
glyphEditor = info["glyphEditor"]
glyphEditorWindow = glyphEditor.window()
possize = glyphEditorWindow.getPosSize()
if possize[0] < 30:
possize = list(possize)
possize[0] = 0
PosSize = glyphEditorWindow.setPosSize(possize)
if __name__ == '__main__':
registerRoboFontSubscriber(glyph_window_position_fix)
@okay-type
Copy link
Author

updated to only snap the window left side if it looks like it was "cascaded" away from the edge of the screen

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