Skip to content

Instantly share code, notes, and snippets.

@okay-type
okay-type / removeOverlapPreview.py
Last active March 24, 2021 18:23 — forked from connordavenport/removeOverlapPreview.py
A startup script to preview a glyph with no overlap. Idea stolen from Glyphs (I still hate Glyphs)
from mojo.roboFont import RGlyph
from mojo.subscriber import Subscriber, registerGlyphEditorSubscriber
from mojo.UI import getDefault, setDefault
from lib.tools.notifications import PostNotification
from fontTools.pens.basePen import BasePen
class MyCopyDecomposingPen(BasePen):
def __init__(self, glyphSet, outPen):
super(MyCopyDecomposingPen, self).__init__(glyphSet)
@okay-type
okay-type / syncAnchors.py
Last active March 23, 2021 17:13 — forked from connordavenport/syncAnchors.py
Sync Anchors
from mojo.subscriber import Subscriber, registerGlyphEditorSubscriber
'''
A startup script to help keep anchors in-sync across glyphs
The script will not append anchors, only move existing anchors
To set a linked glyph, add 'LinkedGlyphs' in your main glyph's .note
Under that line add a comma separated list of glyph names (no spaces)
e.g.
@okay-type
okay-type / keytest-rf4.py
Last active March 18, 2021 16:41 — forked from connordavenport/WASD.py
Convert arrow functions to ASWD keys in the glyphView. If you have shortcuts already set up for any of these keys you will run into issues!
from mojo.subscriber import Subscriber, registerRoboFontSubscriber
from mojo.events import extractNSEvent
class KeyTest(Subscriber):
debug = True
def build(self):
if self.debug == True: