Last active
October 20, 2025 19:02
-
-
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
This file contains hidden or 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 | |
| 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) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
updated to only snap the window left side if it looks like it was "cascaded" away from the edge of the screen