View All-UI.py
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, WindowController | |
from mojo.subscriber import registerRoboFontSubscriber | |
from vanilla import Window, List, CheckBoxListCell, Group, Button | |
from AppKit import NSDragOperationMove, NSDragOperationCopy, NSFilenamesPboardType | |
from mojo.UI import AskYesNoCancel, OpenSpaceCenter, OpenFontInfoSheet, OpenGlyphWindow | |
from os import path as ospath | |
from mojo.roboFont import AllFonts, OpenFont, FontsList | |
from defconAppKit.controls.fontInfoView import FontInfoView | |
from mojo.UI import OutputWindow |
View coalescingTest-hold.py
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): |
View coalescingTest.py
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): |
View mm-save-last-pair.py
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) | |
# |
View MM-quick-compare-kerning.py
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): |
View PossizeTest.py
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() |
View kerning-toggle-MM-size.py
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() |
View kern-flip-openclose-pairs.py
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) | |
# "‚": "‘", | |
# "„": "“", | |
# "„": "”", | |
"‘": "’", | |
# "‛": "’", |
View glyph-to-merz-symbol.py
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 |
View kerning-pairlist-tuner.py
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 |
NewerOlder