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 | |
from mojo.subscriber import registerSubscriberEvent, roboFontSubscriberEventRegistry | |
from mojo.subscriber import WindowController | |
from mojo.events import postEvent | |
from vanilla import Window, Button | |
coalescingTestKey = 'okay.coalescingTest' | |
class coalescingTest(Subscriber, WindowController): |
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 | |
from mojo.subscriber import registerSubscriberEvent, roboFontSubscriberEventRegistry | |
from mojo.subscriber import WindowController | |
from mojo.events import postEvent | |
from vanilla import Window, Button | |
coalescingTestKey = 'okay.coalescingTest.testDidIncrement' | |
class coalescingTest(Subscriber, WindowController): |
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, registerSubscriberEvent, roboFontSubscriberEventRegistry | |
from mojo.extensions import setExtensionDefault, getExtensionDefault, registerExtensionDefaults, removeExtensionDefault | |
from vanilla import Window, Button, TextBox | |
# | |
# IMPORTANT | |
# | |
# As far as i can tell, there's no way to default way detect when a new MM window is opened | |
# instead | |
# this requires modifying the Metrics Machine extension's launch.py (3.7 version) | |
# |
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
import metricsMachine as mm | |
from vanilla import * | |
from mojo.events import addObserver, removeObserver, postEvent | |
from mojo.UI import GetFile | |
import merz | |
from fontTools.pens.basePen import BasePen | |
# this update lets you do basic edits to the current kern value | |
def _getMainWindowControllerForFont(font=None): |
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 vanilla import Window | |
from mojo.extensions import setExtensionDefault, getExtensionDefault, registerExtensionDefaults, removeExtensionDefault | |
class PossizeTest: | |
def __init__(self): | |
self.prefKey = 'com.developer.window.test' | |
w = Window((333, 666), title='Window PosSize Test') | |
w.open() |
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
# menuTitle : MM Toggle size 42-50 | |
# shortCut : \ | |
# works, should probaby add the custom size to the size popup list because there is a traceback complaining it's not there | |
import metricsMachine as mm | |
def _getMainWindowControllerForFont(font=None): | |
if font is None: | |
font = CurrentFont() |
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
# menuTitle : MM Flip Pair Mirror | |
# shortCut : control+6 | |
openclosepairs = { | |
# initial/final punctuation (from https://www.compart.com/en/unicode/category/Pi and https://www.compart.com/en/unicode/category/Pf) | |
# "‚": "‘", | |
# "„": "“", | |
# "„": "”", | |
"‘": "’", | |
# "‛": "’", |
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, registerGlyphEditorSubscriber | |
from vanilla import Button | |
import merz | |
from merz.tools.drawingTools import NSImageDrawingTools | |
''' | |
[ Print Glyph ] | |
dumps code to draw the current glyph as a symbol | |
copy/paste it into the symbol factory at the bottom |
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.UI import GetFolder | |
from glyphNameFormatter import GlyphName | |
import metricsMachine as mm | |
from vanilla import * | |
from vanilla.dialogs import putFile | |
from mojo.events import addObserver, removeObserver, postEvent | |
from AppKit import NSColor, NSFloatingWindowLevel, NSWindowStyleMaskClosable, NSFullSizeContentViewWindowMask, NSTitledWindowMask | |
from mojo.extensions import registerExtensionDefaults, setExtensionDefault, getExtensionDefault, removeExtensionDefault | |
from AppKit import NSApp |
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, registerGlyphEditorSubscriber | |
class SimpleSubscriberTest(Subscriber): | |
debug = False | |
def build(self): | |
if self.debug == True: | |
print('SimpleSubscriberTest', 'SimpleSubscriberTestbuild!') |