mojo.subscriber

Subscriber is an event manager for scripters, making the bridge of subscribing and unsubsribing all sort of events super easy.

getRegisteredSubscriberEvents()

A dictionary of all registered subscriber events.

registerSubscriberEvent(subscriberEventName, methodName, lowLevelEventNames, dispatcher, observeAllInstances=False, eventEligibilityFunction=None, eventInfoExtractionFunction=None, delay=None, documentation='', debug=False)

Register a new subscriber event.

  • subscriberEventName : The subscriber event name.
  • methodName : The method name to be implemented in the Subscriber subclass.
  • lowLevelEventNames : A list of low-level event names that will be posted by dispatcher. This may also be a string if there is only one low level event name.
  • dispatcher : The dispatcher that low level events will be posted from. "roboFont" or "defcon.*" where * is a defcon class name.
  • observeAllInstances : If True lowLevelEventNames will be observed for all instances. This only applies to defcon defcon.Font, defcon.LayerSet and defcon.Layer objects and it is accomplished by sending None as the observable with the lowLevelEventNames to the low level defcon dispatcher. This should be used sparingly as it can cause a significant number of calls to Subscriber instances that implement methodName.
  • eventInfoExtractionFunction : A function for extracting information from the coalesced low-level events. Optional.
  • eventEligibilityFunction : A function for determining if a low-level event should be passed to a subscriber. Optional.
  • delay : A number defining the default delay for the event. Optional. If a value is not given, the default value for the given dispatcher will be used.
  • documentation : A string defining documentation for the event. Optional.
  • debug : A boolean to be used when developing a subscriber event. Optional. False by default

Developers may use this function to add to the built-in events. This function should always be called with key-word arguments instead of unnamed arguments. The argument order may change and new arguments may be added.

from mojo.subscriber import Subscriber, registerRoboFontSubscriber, registerSubscriberEvent

class SimpleSubscriberDemo(Subscriber):

    def myCustomSubscriberMethod(self, info):
        print("myCustomSubscriberMethod", info)


registerSubscriberEvent(
    subscriberEventName="com.robofont.demo.subscriberEvent",
    methodName="myCustomSubscriberMethod",
    lowLevelEventNames=["com.robofont.demo.mojoEvent"],
    dispatcher="roboFont",
    delay=1,
    documentation="This is my custom subscriber method."
)

registerRoboFontSubscriber(SimpleSubscriberDemo)


# ------------------
# SOME TIME LATER...
# ------------------

import random
from mojo.events import postEvent

postEvent("com.robofont.demo.mojoEvent", information="data", number=random.choice((-1, 1)))

eventInfoExtractionFunction

If a low-level event has special data that needs to be extracted from the low-level data and translated into the high-level data, define an eventInfoExtractionFunction like this:

def simpleSubscriberEventInfoExtractor(subscriber, info):
    info["information"] = []
    for lowLevelEvent in info["lowLevelEvents"]:
        info["information"] = lowLevelEvent["information"]

If this is not defined, the raw low-level data will be passed as the high-level data.

eventEligibilityFunction

If a high-level event should be triggered only when certain conditions are met, define an eventEligibilityFunction like this:

def simpleSubscriberEventEligibility(subscriber, event):
    number = event["number"]
    if number == 1:
        return True
    return False

If this is not defined, the eligibility for a high-level event is always True.

registerRoboFontSubscriber(subscriberClass)

Register a Subscriber subclass that will be instantiated when RoboFont is started. This object will remain alive until RoboFont is quit.

unregisterRoboFontSubscriber(subscriberInstance)

Unregister a Subscriber subclass. Provide either a type or an instance.

registerFontOverviewSubscriber(subscriberClass)

Register a Subscriber subclass that will be instantiated when a font overview is opened and will be assigned to the newly opened font overview. The instantiated object’s fontOverview* methods will only be called if the event is relevant to the font overview that owns the instance. The instantiated object will remain alive until the font overview is closed.

unregisterFontOverviewSubscriber(subscriberInstance)

Unregister a Subscriber subclass. Provide either a type or an instance.

registerGlyphEditorSubscriber(subscriberClass)

Register a Subscriber subclass that will be instantiated when a glyph editor opened and will be assigned to the newly opened glyph editor. The instantiated object’s glyphEditor* methods will only be called if the event is relevant to the glyph editor that owns the instance. The instantiated object will remain alive until the glyph editor is closed.

unregisterGlyphEditorSubscriber(subscriberInstance)

Unregister a Subscriber subclass. Provide either a type or an instance.

registerSpaceCenterSubscriber(subscriberClass)

Register a Subscriber subclass that will be instantiated when a space center is opened and will be assigned to the newly opened space center. The instantiated object’s spaceCenter* methods will only be called if the event is relevant to the space center that owns the instance. The instantiated object will remain alive until the space center is closed.

unregisterSpaceCenterSubscriber(subscriberInstance)

Unregister a Subscriber subclass. Provide either a type or an instance.

registerCurrentFontSubscriber(subscriberClass)

Register a Subscriber subclass that will be instantiated when RoboFont is started. The instantiated object’s currentFont* methods will only be called if the event is relevant to the current font. This object will remain alive until RoboFont is quit.

unregisterCurrentFontSubscriber(subscriberInstance)

Unregister a Subscriber subclass. Provide either a type or an instance.

registerCurrentGlyphSubscriber(subscriberClass)

Register a Subscriber subclass that will be instantiated when RoboFont is started. The instantiated object’s currentGlyph* methods will only be called if the event is relevant to the current glyph. This object will remain alive until RoboFont is quit.

unregisterCurrentGlyphSubscriber(subscriberInstance)

Unregister a Subscriber subclass. Provide either a type or an instance.

listRegisteredSubscribers(subscriberClassName=None)

Return a list of initiated registered Subscriber instances.

class Subscriber()

This class allows you to easily subscribe to events within RoboFont. Subclass Subscriber and indicate what events you want to subscribe to by overriding callbacks that correspond to events. For example

class ExampleSubscriber(Subscriber):

    def glyphEditorDidSetGlyph(self, info):
        glyph = info["glyph"]
        print("A glyph editor was set with this glyph.", glyph)

    def glyphEditorDidMouseDown(self, info):
        location = info["locationInGlyph"]
        print("Mouse down in glyph editor at:", location)

Debugging

Always give your subclass a unique name. The class name is used as an identifier within the low-level event systems. When developing your subscriber, set the debug flag in the class to True. This will instruct the subscriber to scan through the low-level event systems for references to any other instances of your subclass.

class ExampleSubscriber(Subscriber):

    debug = True

Be careful with this. If you are trying to debug something not being updated and are completely stumped, set debug = False, restart RoboFont and then try your tool again.

Event Coalescing

Subscriber uses event coalescing to reduce redundant event posting. This is done by waiting for a specified amount of time after a low-level event has been posted before calling the corresponding subclass method. If a related low-level event is posted before the time has expired, the waiting starts over. Tools that need instant calling of any or all of the subclass methods may set the delay of any methods to 0. Likewise, tools that can tolerate a small lag set the delay of any methods to the appropriate time. All delay times are defined as float values representing seconds. Any event with Will or Wants in its name should always have a delay of 0 to prevent unexpected asynchronous behavior.

The default delay for RoboFont event is ‘0’. For defcon event the default delay is ‘0.03’.

To specify a custom delay for a method in your subclass, create an attributes with the same method name plus Delay and set the value to a float.

class ExampleSubscriber(Subscriber):

    glyphEditorDidSetGlyphDelay = 0.2

    def glyphEditorDidSetGlyph(self, info):
        glyph = info["glyph"]
        print("A glyph editor was set with this glyph.", glyph)

    glyphEditorDidMouseDownDelay = 0

    def glyphEditorDidMouseDown(self, info):
        location = info["location"]
        print("Mouse down in glyph editor at:", location)

Callbacks Arguments

Each method must take one info argument. The value for this argument will be a dictionary. All info dictionaries have these keys:

  • subscriberEventName : The subscriber event name.
  • iterations : An ordered list of the iterations of the important data from the lowLevelEvents. The items in the list will be dictionaries.
  • lowLevelEvents : An ordered list of low-level events.

Events may have their own keys (as detailed in the event documentation). Events triggered by mouse of key events may have a deviceState dictionary with this structure:

  • clickCount : The number of mouse clicks.
  • keyDown : The pressed character.
  • keyDownWithoutModifiers : The pressed characters with modifiers.
  • up : A bool indicating if the up arrow key is pressed.
  • down : A bool indicating if the down arrow key is pressed.
  • left : A bool indicating if the left arrow key is pressed.
  • right : A bool indicating if the right arrow key is pressed.
  • shiftDown : A bool indicating if the Shift modifier key is pressed.
  • capLockDown : A bool indicating if the Caps Lock modifier key is pressed.
  • optionDown : A bool indicating if the Option modifier key is pressed.
  • controlDown : A bool indicating if the Control modifier key is pressed.
  • commandDown : A bool indicating if the Command modifier key is pressed.
  • locationInWindow : The location of the event in window coordinates.
  • locationInView : The location of the event in view coordinates.

Any objects outside of lowLevelEvents that can be represented with fontParts objects will be.

Interaction Callbacks

RoboFont Application

roboFontDidFinishLaunching(self, info)

This will be called when a mojo.events.applicationDidFinishLaunching event is posted. Default delay set to 0.00 seconds.

roboFontDidBecomeActive(self, info)

This will be called when a mojo.events.applicationDidBecomeActive event is posted. Default delay set to 0.00 seconds.

roboFontWillResignActive(self, info)

This will be called when a mojo.events.applicationWillResignActive event is posted. Default delay set to 0.00 seconds.

roboFontDidChangeScreen(self, info)

This will be called when a mojo.events.applicationScreenChanged event is posted. Default delay set to 0.00 seconds.

roboFontWillTerminate(self, info)

This will be called when a mojo.events.applicationWillTerminate event is posted. Default delay set to 0.00 seconds.

roboFontWantsOpenUnknownFileType(self, info)

This will be called when a mojo.events.applicationOpenFile event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • fileHandler
  • fileExtension
  • path

roboFontDidSwitchCurrentGlyph(self, info)

This will be called when a mojo.events.currentGlyphChanged event is posted. Default delay set to 0.00 seconds.

roboFontDidBuildExtension(self, info)

This will be called when a mojo.events.extensionDidGenerate event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • path

roboFontWillRunExternalScript(self, info)

This will be called when a mojo.events.externalLaunchEvent event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • data

roboFontWantsInspectorViews(self, info)

This will be called when a mojo.events.inspectorWindowWillShowDescriptions event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • viewDescriptions

roboFontWantsNamespaceAdditions(self, info)

This will be called when a mojo.events.namespaceCallbacks event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • namespace

roboFontDidChangePreferences(self, info)

This will be called when a mojo.events.preferencesChanged event is posted. Default delay set to 0.00 seconds.

roboFontAppearanceChanged(self, info)

This will be called when a mojo.events.appearanceChanged event is posted. Default delay set to 0.00 seconds.

Font Document

currentFontDidSetFont(self, info)

Called when the current font is set.

fontDocumentWillOpenNew(self, info)

This will be called when a mojo.events.newFontWillOpen event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • font

fontDocumentDidOpenNew(self, info)

This will be called when a mojo.events.newFontDidOpen event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • font

fontDocumentWillOpenBinaryFont(self, info)

This will be called when a mojo.events.binaryFontWillOpen event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • font
  • format
  • source

fontDocumentWillOpen(self, info)

This will be called when a mojo.events.fontWillOpen event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • font

fontDocumentDidOpen(self, info)

This will be called when a mojo.events.fontDidOpen event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • font

fontDocumentWillSave(self, info)

This will be called when a mojo.events.fontWillSave event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • font
  • path

fontDocumentDidSave(self, info)

This will be called when a mojo.events.fontDidSave event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • font
  • path

fontDocumentWillAutoSave(self, info)

This will be called when a mojo.events.fontWillAutoSave event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • font

fontDocumentDidAutoSave(self, info)

This will be called when a mojo.events.fontDidAutoSave event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • font

fontDocumentWillGenerate(self, info)

This will be called when a mojo.events.fontWillGenerate event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • font
  • testInstall
  • format
  • path
  • layerName

fontDocumentDidGenerate(self, info)

This will be called when a mojo.events.fontDidGenerate event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • font
  • format
  • path
  • layerName

fontDocumentWillTestInstall(self, info)

This will be called when a mojo.events.fontWillTestInstall event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • font
  • success
  • format
  • report

fontDocumentDidTestInstall(self, info)

This will be called when a mojo.events.fontDidTestInstall event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • font
  • format

fontDocumentWillTestDeinstall(self, info)

This will be called when a mojo.events.fontWillTestDeinstall event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • font

fontDocumentDidTestDeinstall(self, info)

This will be called when a mojo.events.fontDidTestDeinstall event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • font

fontDocumentDidChangeExternally(self, info)

This will be called when a mojo.events.fontDidChangeExternally event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • font

fontDocumentDidBecomeCurrent(self, info)

This will be called when a mojo.events.fontBecameCurrent event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • font

fontDocumentDidResignCurrent(self, info)

This will be called when a mojo.events.fontResignCurrent event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • font

fontDocumentWillClose(self, info)

This will be called when a mojo.events.fontWillClose event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • font

fontDocumentDidClose(self, info)

This will be called when a mojo.events.fontDidClose event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • font

fontDocumentWindowDidOpen(self, info)

This will be called when a mojo.events.fontWindowDidOpen event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • font

fontDocumentWindowWillOpen(self, info)

This will be called when a mojo.events.fontWindowWillOpen event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • font

fontDocumentWantsToolbarItems(self, info)

This will be called when a mojo.events.fontWindowWillShowToolbarItems event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • font
  • singleWindowMode
  • itemDescriptions

Font Overview

fontOverviewWillOpen(self, info)

This will be called when a mojo.events.fontOverviewWillOpen event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • fontOverview
  • font

fontOverviewDidOpen(self, info)

This will be called when a mojo.events.fontOverviewDidOpen event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • fontOverview
  • font

fontOverviewWillClose(self, info)

This will be called when a mojo.events.fontOverviewWillClose event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • fontOverview
  • font

fontOverviewDidCopy(self, info)

This will be called when a mojo.events.fontOverviewCopy event is posted. Default delay set to 0.00 seconds.

fontOverviewDidRedo(self, info)

This will be called when a mojo.events.fontOverViewRedo event is posted. Default delay set to 0.00 seconds.

fontOverviewDidUndo(self, info)

This will be called when a mojo.events.fontOverViewUndo event is posted. Default delay set to 0.00 seconds.

fontOverviewDidPaste(self, info)

This will be called when a mojo.events.fontOverviewPaste event is posted. Default delay set to 0.00 seconds.

fontOverviewWantsContextualMenuItems(self, info)

This will be called when a mojo.events.fontOverviewAdditionContextualMenuItems event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • itemDescriptions

Glyph Editor

currentGlyphDidSetGlyph(self, info)

Called when the current glyph is set.

glyphEditorWillOpen(self, info)

This will be called when a mojo.events.glyphWindowWillOpen event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor

glyphEditorDidOpen(self, info)

This will be called when a mojo.events.glyphWindowDidOpen event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor

glyphEditorWillClose(self, info)

This will be called when a mojo.events.glyphWindowWillClose event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor

glyphEditorWillSetGlyph(self, info)

This will be called when a mojo.events.viewWillChangeGlyph event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor

glyphEditorDidSetGlyph(self, info)

This will be called when a mojo.events.viewDidChangeGlyph event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor

glyphEditorDidKeyDown(self, info)

This will be called when a mojo.events.keyDown event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor
  • locationInGlyph
  • deviceState
  • NSEvent

glyphEditorDidKeyUp(self, info)

This will be called when a mojo.events.keyUp event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor
  • locationInGlyph
  • deviceState
  • NSEvent

glyphEditorDidChangeModifiers(self, info)

This will be called when a mojo.events.modifiersChanged event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor
  • locationInGlyph
  • deviceState
  • NSEvent

glyphEditorWillShowPreview(self, info)

This will be called when a mojo.events.viewWillShowPreview event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor

glyphEditorWillHidePreview(self, info)

This will be called when a mojo.events.viewWillHidePreview event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor

glyphEditorDidMouseDown(self, info)

This will be called when a mojo.events.mouseDown event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor
  • locationInGlyph
  • deviceState
  • NSEvent

glyphEditorDidMouseUp(self, info)

This will be called when a mojo.events.mouseUp event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor
  • locationInGlyph
  • deviceState
  • NSEvent
  • offset

glyphEditorDidMouseMove(self, info)

This will be called when a mojo.events.mouseMoved event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor
  • locationInGlyph
  • deviceState
  • NSEvent
  • offset

glyphEditorDidMouseDrag(self, info)

This will be called when a mojo.events.mouseDragged event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor
  • locationInGlyph
  • deviceState
  • NSEvent
  • offset
  • delta

glyphEditorDidRightMouseDown(self, info)

This will be called when a mojo.events.rightMouseDown event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor
  • locationInGlyph
  • deviceState
  • NSEvent

glyphEditorDidRightMouseDrag(self, info)

This will be called when a mojo.events.rightMouseDragged event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor
  • locationInGlyph
  • deviceState
  • NSEvent
  • offset
  • delta

glyphEditorDidRightMouseUp(self, info)

This will be called when a mojo.events.rightMouseUp event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor
  • locationInGlyph
  • deviceState
  • NSEvent
  • offset

glyphEditorDidScale(self, info)

This will be called when a mojo.events.viewDidChangeScale event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor
  • scale

glyphEditorWillScale(self, info)

This will be called when a mojo.events.viewWillChangeScale event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor
  • scale

glyphEditorDidCopy(self, info)

This will be called when a mojo.events.copy event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor
  • locationInGlyph
  • deviceState
  • NSEvent

glyphEditorDidCopyAsComponent(self, info)

This will be called when a mojo.events.copyAsComponent event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor
  • locationInGlyph
  • deviceState
  • NSEvent

glyphEditorDidCut(self, info)

This will be called when a mojo.events.cut event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor
  • locationInGlyph
  • deviceState
  • NSEvent

glyphEditorDidPaste(self, info)

This will be called when a mojo.events.paste event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor
  • locationInGlyph
  • deviceState
  • NSEvent

glyphEditorDidPasteSpecial(self, info)

This will be called when a mojo.events.pasteSpecial event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor
  • locationInGlyph
  • deviceState
  • NSEvent

glyphEditorDidDelete(self, info)

This will be called when a mojo.events.delete event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor
  • locationInGlyph
  • deviceState
  • NSEvent

glyphEditorDidSelectAll(self, info)

This will be called when a mojo.events.selectAll event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor
  • locationInGlyph
  • deviceState
  • NSEvent

glyphEditorDidSelectAllAlternate(self, info)

This will be called when a mojo.events.selectAllAlternate event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor
  • locationInGlyph
  • deviceState
  • NSEvent

glyphEditorDidSelectAllControl(self, info)

This will be called when a mojo.events.selectAllControl event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor
  • locationInGlyph
  • deviceState
  • NSEvent

glyphEditorDidDeselectAll(self, info)

This will be called when a mojo.events.deselectAll event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor
  • locationInGlyph
  • deviceState
  • NSEvent

glyphEditorDidAddUndoItem(self, info)

This will be called when a mojo.events.addedUndoItem event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor
  • locationInGlyph
  • deviceState
  • NSEvent

glyphEditorDidUndo(self, info)

This will be called when a mojo.events.didUndo event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor
  • locationInGlyph
  • deviceState
  • NSEvent

glyphEditorWantsContextualMenuItems(self, info)

This will be called when a mojo.events.glyphAdditionContextualMenuItems event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor
  • locationInGlyph
  • deviceState
  • NSEvent
  • itemDescriptions

glyphEditorWantsPointContexualMenuItems(self, info)

This will be called when a mojo.events.pointAdditionContextualMenuItems event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor
  • locationInGlyph
  • deviceState
  • NSEvent
  • itemDescriptions

glyphEditorWantsAnchorContextualMenuItems(self, info)

This will be called when a mojo.events.anchorAdditionContextualMenuItems event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor
  • locationInGlyph
  • deviceState
  • NSEvent
  • itemDescriptions

glyphEditorWantsGuidelineContextualMenuItems(self, info)

This will be called when a mojo.events.guideAdditionContextualMenuItems event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor
  • locationInGlyph
  • deviceState
  • NSEvent
  • itemDescriptions

glyphEditorWantsImageContextualMenuItems(self, info)

This will be called when a mojo.events.imageAdditionContextualMenuItems event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor
  • locationInGlyph
  • deviceState
  • NSEvent
  • itemDescriptions

glyphEditorWantsToolbarItems(self, info)

Available when registered as a RoboFont subscriber: registerRoboFontSubscriber.The info dictionary contains:

  • itemDescriptions

glyphEditorDidChangeDisplaySettings(self, info)

This will be called when a mojo.events.glyphViewShowItemsDidChange event is posted. Default delay set to 0.00 seconds. The info dictionary contains:

  • glyph
  • glyphEditor
  • displaySettings

Space Center

spaceCenterWillOpen(self, info)

This will be called when a mojo.events.spaceCenterWillOpen event is posted. Default delay set to 0.00 seconds.

spaceCenterDidOpen(self, info)

This will be called when a mojo.events.spaceCenterDidOpen event is posted. Default delay set to 0.00 seconds.

spaceCenterWillClose(self, info)

This will be called when a mojo.events.spaceCenterWillClose event is posted. Default delay set to 0.00 seconds.

spaceCenterDidKeyDown(self, info)

This will be called when a mojo.events.spaceCenterKeyDown event is posted. Default delay set to 0.00 seconds.

spaceCenterDidKeyUp(self, info)

This will be called when a mojo.events.spaceCenterKeyUp event is posted. Default delay set to 0.00 seconds.

spaceCenterDidChangeSelection(self, info)

This will be called when a mojo.events.spaceCenterSelectionChanged event is posted. Default delay set to 0.00 seconds.

spaceCenterDidChangeText(self, info)

This will be called when a mojo.events.spaceCenterInputChanged event is posted. Default delay set to 0.00 seconds.

spaceCenterWantsContextualMenuItems(self, info)

This will be called when a mojo.events.spaceCenterAdditionContextualMenuItems event is posted. Default delay set to 0.00 seconds.

Data Manipulation Callbacks

No Subscriber filter

fontDidChange(self, info)

This will be called when any of Font.Changed are posted. Default delay set to 0.033 seconds.

fontDidReloadGlyphs(self, info)

This will be called when any of Font.ReloadedGlyphs are posted. Default delay set to 0.033 seconds.

fontDidChangeGlyphOrder(self, info)

This will be called when any of Font.GlyphOrderChanged are posted. Default delay set to 0.033 seconds.

fontDidChangeGuidelines(self, info)

This will be called when any of Font.GuidelinesChanged are posted. Default delay set to 0.033 seconds.

fontInfoDidChange(self, info)

This will be called when any of Info.Changed are posted. Default delay set to 0.033 seconds.

fontInfoDidChangeValue(self, info)

This will be called when any of Info.ValueChanged are posted. Default delay set to 0.033 seconds.

fontKerningDidChange(self, info)

This will be called when any of Kerning.Changed are posted. Default delay set to 0.033 seconds.

fontKerningDidChangePair(self, info)

This will be called when any of Kerning.PairSet, Kerning.PairDeleted are posted. Default delay set to 0.033 seconds.

fontKerningDidClear(self, info)

This will be called when any of Kerning.Cleared are posted. Default delay set to 0.033 seconds.

fontKerningDidUpdate(self, info)

This will be called when any of Kerning.Updated are posted. Default delay set to 0.033 seconds.

fontGroupsDidChange(self, info)

This will be called when any of Groups.Changed are posted. Default delay set to 0.033 seconds.

fontGroupsDidChangeGroup(self, info)

This will be called when any of Groups.GroupSet, Groups.GroupDeleted are posted. Default delay set to 0.033 seconds.

fontGroupsDidClear(self, info)

This will be called when any of Groups.Cleared are posted. Default delay set to 0.033 seconds.

fontGroupsDidUpdate(self, info)

This will be called when any of Groups.Updated are posted. Default delay set to 0.033 seconds.

fontFeaturesDidChange(self, info)

This will be called when any of Features.Changed are posted. Default delay set to 0.033 seconds.

fontFeaturesDidChangeText(self, info)

This will be called when any of Features.TextChanged are posted. Default delay set to 0.033 seconds.

fontLayersDidChange(self, info)

This will be called when any of LayerSet.LayersChanged are posted. Default delay set to 0.033 seconds.

fontLayersDidChangeLayer(self, info)

This will be called when any of LayerSet.LayerChanged are posted. Default delay set to 0.033 seconds.

fontLayersDidSetDefaultLayer(self, info)

This will be called when any of LayerSet.DefaultLayerChanged are posted. Default delay set to 0.033 seconds.

fontLayersDidChangeOrder(self, info)

This will be called when any of LayerSet.LayerOrderChanged are posted. Default delay set to 0.033 seconds.

fontLayersDidAddLayer(self, info)

This will be called when any of LayerSet.LayerAdded are posted. Default delay set to 0.033 seconds.

fontLayersDidRemoveLayer(self, info)

This will be called when any of LayerSet.LayerDeleted are posted. Default delay set to 0.033 seconds.

fontLayersDidChangeLayerName(self, info)

This will be called when any of LayerSet.LayerNameChanged are posted. Default delay set to 0.033 seconds.

layerDidChange(self, info)

This will be called when any of Layer.Changed are posted. Default delay set to 0.033 seconds.

layerDidChangeGlyphs(self, info)

This will be called when any of Layer.GlyphsChanged are posted. Default delay set to 0.033 seconds.

layerDidChangeGlyph(self, info)

This will be called when any of Layer.GlyphChanged are posted. Default delay set to 0.033 seconds.

layerDidAddGlyph(self, info)

This will be called when any of Layer.GlyphAdded are posted. Default delay set to 0.033 seconds.

layerDidRemoveGlyph(self, info)

This will be called when any of Layer.GlyphDeleted are posted. Default delay set to 0.033 seconds.

layerDidChangeGlyphName(self, info)

This will be called when any of Layer.GlyphNameChanged are posted. Default delay set to 0.033 seconds.

layerDidChangeGlyphUnicodes(self, info)

This will be called when any of Layer.GlyphUnicodesChanged are posted. Default delay set to 0.033 seconds.

layerDidChangeName(self, info)

This will be called when any of Layer.NameChanged are posted. Default delay set to 0.033 seconds.

layerDidChangeColor(self, info)

This will be called when any of Layer.ColorChanged are posted. Default delay set to 0.033 seconds.

glyphDidChange(self, info)

This will be called when any of Glyph.Changed are posted. Default delay set to 0.033 seconds.

glyphDidChangeInfo(self, info)

This will be called when any of Glyph.NameChanged, Glyph.UnicodesChanged, Glyph.NoteChanged, Glyph.MarkColorChanged are posted. Default delay set to 0.033 seconds.

glyphDidChangeMetrics(self, info)

This will be called when any of Glyph.WidthChanged, Glyph.HeightChanged, Glyph.LeftMarginDidChange, Glyph.RightMarginDidChange, Glyph.TopMarginDidChange, Glyph.BottomMarginDidChange, Glyph.VerticalOriginChanged are posted. Default delay set to 0.033 seconds.

glyphDidChangeOutline(self, info)

This will be called when any of Glyph.ContoursChanged, Glyph.ComponentsChanged are posted. Default delay set to 0.033 seconds.

glyphDidChangeContours(self, info)

This will be called when any of Glyph.ContoursChanged are posted. Default delay set to 0.033 seconds.

glyphDidChangeComponents(self, info)

This will be called when any of Glyph.ComponentsChanged are posted. Default delay set to 0.033 seconds.

glyphDidChangeAnchors(self, info)

This will be called when any of Glyph.AnchorsChanged are posted. Default delay set to 0.033 seconds.

glyphDidChangeGuidelines(self, info)

This will be called when any of Glyph.GuidelinesChanged are posted. Default delay set to 0.033 seconds.

glyphDidChangeImage(self, info)

This will be called when any of Glyph.ImageChanged are posted. Default delay set to 0.033 seconds.

glyphDidChangeSelection(self, info)

This will be called when any of Glyph.SelectionChanged are posted. Default delay set to 0.033 seconds.

glyphDidStartChangeSelection(self, info)

This will be called when any of Glyph.SelectionStarted are posted. Default delay set to 0.000 seconds.

glyphDidEndChangeSelection(self, info)

This will be called when any of Glyph.SelectionEnded are posted. Default delay set to 0.000 seconds.

glyphDidChangeMeasurements(self, info)

This will be called when any of Glyph.MeasurementAdded, Glyph.MeasurementsCleared, Glyph.MeasurementChanged are posted. Default delay set to 0.033 seconds.

Glyph Editor

glyphEditorFontDidChange(self, info)

This does the same thing as fontDidChange but is only called for the glyph in the glyph editor.

glyphEditorFontDidReloadGlyphs(self, info)

This does the same thing as fontDidReloadGlyphs but is only called for the glyph in the glyph editor.

glyphEditorFontDidChangeGlyphOrder(self, info)

This does the same thing as fontDidChangeGlyphOrder but is only called for the glyph in the glyph editor.

glyphEditorFontDidChangeGuidelines(self, info)

This does the same thing as fontDidChangeGuidelines but is only called for the glyph in the glyph editor.

glyphEditorFontInfoDidChange(self, info)

This does the same thing as fontInfoDidChange but is only called for the glyph in the glyph editor.

glyphEditorFontInfoDidChangeValue(self, info)

This does the same thing as fontInfoDidChangeValue but is only called for the glyph in the glyph editor.

glyphEditorFontKerningDidChange(self, info)

This does the same thing as fontKerningDidChange but is only called for the glyph in the glyph editor.

glyphEditorFontKerningDidChangePair(self, info)

This does the same thing as fontKerningDidChangePair but is only called for the glyph in the glyph editor.

glyphEditorFontKerningDidClear(self, info)

This does the same thing as fontKerningDidClear but is only called for the glyph in the glyph editor.

glyphEditorFontKerningDidUpdate(self, info)

This does the same thing as fontKerningDidUpdate but is only called for the glyph in the glyph editor.

glyphEditorFontGroupsDidChange(self, info)

This does the same thing as fontGroupsDidChange but is only called for the glyph in the glyph editor.

glyphEditorFontGroupsDidChangeGroup(self, info)

This does the same thing as fontGroupsDidChangeGroup but is only called for the glyph in the glyph editor.

glyphEditorFontGroupsDidClear(self, info)

This does the same thing as fontGroupsDidClear but is only called for the glyph in the glyph editor.

glyphEditorFontGroupsDidUpdate(self, info)

This does the same thing as fontGroupsDidUpdate but is only called for the glyph in the glyph editor.

glyphEditorFontFeaturesDidChange(self, info)

This does the same thing as fontFeaturesDidChange but is only called for the glyph in the glyph editor.

glyphEditorFontFeaturesDidChangeText(self, info)

This does the same thing as fontFeaturesDidChangeText but is only called for the glyph in the glyph editor.

glyphEditorFontLayersDidChange(self, info)

This does the same thing as fontLayersDidChange but is only called for the glyph in the glyph editor.

glyphEditorFontLayersDidChangeLayer(self, info)

This does the same thing as fontLayersDidChangeLayer but is only called for the glyph in the glyph editor.

glyphEditorFontLayersDidSetDefaultLayer(self, info)

This does the same thing as fontLayersDidSetDefaultLayer but is only called for the glyph in the glyph editor.

glyphEditorFontLayersDidChangeOrder(self, info)

This does the same thing as fontLayersDidChangeOrder but is only called for the glyph in the glyph editor.

glyphEditorFontLayersDidAddLayer(self, info)

This does the same thing as fontLayersDidAddLayer but is only called for the glyph in the glyph editor.

glyphEditorFontLayersDidRemoveLayer(self, info)

This does the same thing as fontLayersDidRemoveLayer but is only called for the glyph in the glyph editor.

glyphEditorFontLayersDidChangeLayerName(self, info)

This does the same thing as fontLayersDidChangeLayerName but is only called for the glyph in the glyph editor.

glyphEditorLayerDidChange(self, info)

This does the same thing as layerDidChange but is only called for the glyph in the glyph editor.

glyphEditorLayerDidChangeGlyphs(self, info)

This does the same thing as layerDidChangeGlyphs but is only called for the glyph in the glyph editor.

glyphEditorLayerDidChangeGlyph(self, info)

This does the same thing as layerDidChangeGlyph but is only called for the glyph in the glyph editor.

glyphEditorLayerDidAddGlyph(self, info)

This does the same thing as layerDidAddGlyph but is only called for the glyph in the glyph editor.

glyphEditorLayerDidRemoveGlyph(self, info)

This does the same thing as layerDidRemoveGlyph but is only called for the glyph in the glyph editor.

glyphEditorLayerDidChangeGlyphName(self, info)

This does the same thing as layerDidChangeGlyphName but is only called for the glyph in the glyph editor.

glyphEditorLayerDidChangeGlyphUnicodes(self, info)

This does the same thing as layerDidChangeGlyphUnicodes but is only called for the glyph in the glyph editor.

glyphEditorLayerDidChangeName(self, info)

This does the same thing as layerDidChangeName but is only called for the glyph in the glyph editor.

glyphEditorLayerDidChangeColor(self, info)

This does the same thing as layerDidChangeColor but is only called for the glyph in the glyph editor.

glyphEditorGlyphDidChange(self, info)

This does the same thing as glyphDidChange but is only called for the glyph in the glyph editor.

glyphEditorGlyphDidChangeInfo(self, info)

This does the same thing as glyphDidChangeInfo but is only called for the glyph in the glyph editor.

glyphEditorGlyphDidChangeMetrics(self, info)

This does the same thing as glyphDidChangeMetrics but is only called for the glyph in the glyph editor.

glyphEditorGlyphDidChangeOutline(self, info)

This does the same thing as glyphDidChangeOutline but is only called for the glyph in the glyph editor.

glyphEditorGlyphDidChangeContours(self, info)

This does the same thing as glyphDidChangeContours but is only called for the glyph in the glyph editor.

glyphEditorGlyphDidChangeComponents(self, info)

This does the same thing as glyphDidChangeComponents but is only called for the glyph in the glyph editor.

glyphEditorGlyphDidChangeAnchors(self, info)

This does the same thing as glyphDidChangeAnchors but is only called for the glyph in the glyph editor.

glyphEditorGlyphDidChangeGuidelines(self, info)

This does the same thing as glyphDidChangeGuidelines but is only called for the glyph in the glyph editor.

glyphEditorGlyphDidChangeImage(self, info)

This does the same thing as glyphDidChangeImage but is only called for the glyph in the glyph editor.

glyphEditorGlyphDidChangeSelection(self, info)

This does the same thing as glyphDidChangeSelection but is only called for the glyph in the glyph editor.

glyphEditorGlyphDidStartChangeSelection(self, info)

This does the same thing as glyphDidStartChangeSelection but is only called for the glyph in the glyph editor.

glyphEditorGlyphDidEndChangeSelection(self, info)

This does the same thing as glyphDidEndChangeSelection but is only called for the glyph in the glyph editor.

glyphEditorGlyphDidChangeMeasurements(self, info)

This does the same thing as glyphDidChangeMeasurements but is only called for the glyph in the glyph editor.

Current Font

currentFontDidChange(self, info)

This does the same thing as fontDidChange but is only called for the current font.

currentFontDidReloadGlyphs(self, info)

This does the same thing as fontDidReloadGlyphs but is only called for the current font.

currentFontDidChangeGlyphOrder(self, info)

This does the same thing as fontDidChangeGlyphOrder but is only called for the current font.

currentFontDidChangeGuidelines(self, info)

This does the same thing as fontDidChangeGuidelines but is only called for the current font.

currentFontInfoDidChange(self, info)

This does the same thing as fontInfoDidChange but is only called for the current font.

currentFontInfoDidChangeValue(self, info)

This does the same thing as fontInfoDidChangeValue but is only called for the current font.

currentFontKerningDidChange(self, info)

This does the same thing as fontKerningDidChange but is only called for the current font.

currentFontKerningDidChangePair(self, info)

This does the same thing as fontKerningDidChangePair but is only called for the current font.

currentFontKerningDidClear(self, info)

This does the same thing as fontKerningDidClear but is only called for the current font.

currentFontKerningDidUpdate(self, info)

This does the same thing as fontKerningDidUpdate but is only called for the current font.

currentFontGroupsDidChange(self, info)

This does the same thing as fontGroupsDidChange but is only called for the current font.

currentFontGroupsDidChangeGroup(self, info)

This does the same thing as fontGroupsDidChangeGroup but is only called for the current font.

currentFontGroupsDidClear(self, info)

This does the same thing as fontGroupsDidClear but is only called for the current font.

currentFontGroupsDidUpdate(self, info)

This does the same thing as fontGroupsDidUpdate but is only called for the current font.

currentFontFeaturesDidChange(self, info)

This does the same thing as fontFeaturesDidChange but is only called for the current font.

currentFontFeaturesDidChangeText(self, info)

This does the same thing as fontFeaturesDidChangeText but is only called for the current font.

currentFontLayersDidChange(self, info)

This does the same thing as fontLayersDidChange but is only called for the current font.

currentFontLayersDidChangeLayer(self, info)

This does the same thing as fontLayersDidChangeLayer but is only called for the current font.

currentFontLayersDidSetDefaultLayer(self, info)

This does the same thing as fontLayersDidSetDefaultLayer but is only called for the current font.

currentFontLayersDidChangeOrder(self, info)

This does the same thing as fontLayersDidChangeOrder but is only called for the current font.

currentFontLayersDidAddLayer(self, info)

This does the same thing as fontLayersDidAddLayer but is only called for the current font.

currentFontLayersDidRemoveLayer(self, info)

This does the same thing as fontLayersDidRemoveLayer but is only called for the current font.

currentFontLayersDidChangeLayerName(self, info)

This does the same thing as fontLayersDidChangeLayerName but is only called for the current font.

currentFontLayerDidChange(self, info)

This does the same thing as layerDidChange but is only called for the current font. This should be used sparingly as it can result in a high number of calls. Refer to the Subscriber examples for more information on when this should be used.

currentFontLayerDidChangeGlyphs(self, info)

This does the same thing as layerDidChangeGlyphs but is only called for the current font. This should be used sparingly as it can result in a high number of calls. Refer to the Subscriber examples for more information on when this should be used.

currentFontLayerDidChangeGlyph(self, info)

This does the same thing as layerDidChangeGlyph but is only called for the current font. This should be used sparingly as it can result in a high number of calls. Refer to the Subscriber examples for more information on when this should be used.

currentFontLayerDidAddGlyph(self, info)

This does the same thing as layerDidAddGlyph but is only called for the current font. This should be used sparingly as it can result in a high number of calls. Refer to the Subscriber examples for more information on when this should be used.

currentFontLayerDidRemoveGlyph(self, info)

This does the same thing as layerDidRemoveGlyph but is only called for the current font. This should be used sparingly as it can result in a high number of calls. Refer to the Subscriber examples for more information on when this should be used.

currentFontLayerDidChangeGlyphName(self, info)

This does the same thing as layerDidChangeGlyphName but is only called for the current font. This should be used sparingly as it can result in a high number of calls. Refer to the Subscriber examples for more information on when this should be used.

currentFontLayerDidChangeGlyphUnicodes(self, info)

This does the same thing as layerDidChangeGlyphUnicodes but is only called for the current font. This should be used sparingly as it can result in a high number of calls. Refer to the Subscriber examples for more information on when this should be used.

currentFontLayerDidChangeName(self, info)

This does the same thing as layerDidChangeName but is only called for the current font. This should be used sparingly as it can result in a high number of calls. Refer to the Subscriber examples for more information on when this should be used.

currentFontLayerDidChangeColor(self, info)

This does the same thing as layerDidChangeColor but is only called for the current font. This should be used sparingly as it can result in a high number of calls. Refer to the Subscriber examples for more information on when this should be used.

currentFontGlyphDidChange(self, info)

This does the same thing as glyphDidChange but is only called for the current font. This should be used sparingly as it can result in a high number of calls. Refer to the Subscriber examples for more information on when this should be used.

currentFontGlyphDidChangeInfo(self, info)

This does the same thing as glyphDidChangeInfo but is only called for the current font. This should be used sparingly as it can result in a high number of calls. Refer to the Subscriber examples for more information on when this should be used.

currentFontGlyphDidChangeMetrics(self, info)

This does the same thing as glyphDidChangeMetrics but is only called for the current font. This should be used sparingly as it can result in a high number of calls. Refer to the Subscriber examples for more information on when this should be used.

currentFontGlyphDidChangeOutline(self, info)

This does the same thing as glyphDidChangeOutline but is only called for the current font. This should be used sparingly as it can result in a high number of calls. Refer to the Subscriber examples for more information on when this should be used.

currentFontGlyphDidChangeContours(self, info)

This does the same thing as glyphDidChangeContours but is only called for the current font. This should be used sparingly as it can result in a high number of calls. Refer to the Subscriber examples for more information on when this should be used.

currentFontGlyphDidChangeComponents(self, info)

This does the same thing as glyphDidChangeComponents but is only called for the current font. This should be used sparingly as it can result in a high number of calls. Refer to the Subscriber examples for more information on when this should be used.

currentFontGlyphDidChangeAnchors(self, info)

This does the same thing as glyphDidChangeAnchors but is only called for the current font. This should be used sparingly as it can result in a high number of calls. Refer to the Subscriber examples for more information on when this should be used.

currentFontGlyphDidChangeGuidelines(self, info)

This does the same thing as glyphDidChangeGuidelines but is only called for the current font. This should be used sparingly as it can result in a high number of calls. Refer to the Subscriber examples for more information on when this should be used.

currentFontGlyphDidChangeImage(self, info)

This does the same thing as glyphDidChangeImage but is only called for the current font. This should be used sparingly as it can result in a high number of calls. Refer to the Subscriber examples for more information on when this should be used.

currentFontGlyphDidChangeSelection(self, info)

This does the same thing as glyphDidChangeSelection but is only called for the current font. This should be used sparingly as it can result in a high number of calls. Refer to the Subscriber examples for more information on when this should be used.

currentFontGlyphDidStartChangeSelection(self, info)

This does the same thing as glyphDidStartChangeSelection but is only called for the current font. This should be used sparingly as it can result in a high number of calls. Refer to the Subscriber examples for more information on when this should be used.

currentFontGlyphDidEndChangeSelection(self, info)

This does the same thing as glyphDidEndChangeSelection but is only called for the current font. This should be used sparingly as it can result in a high number of calls. Refer to the Subscriber examples for more information on when this should be used.

currentFontGlyphDidChangeMeasurements(self, info)

This does the same thing as glyphDidChangeMeasurements but is only called for the current font. This should be used sparingly as it can result in a high number of calls. Refer to the Subscriber examples for more information on when this should be used.

Current Glyph

currentGlyphFontDidChange(self, info)

This does the same thing as fontDidChange but is only called for the current glyph.

currentGlyphFontDidReloadGlyphs(self, info)

This does the same thing as fontDidReloadGlyphs but is only called for the current glyph.

currentGlyphFontDidChangeGlyphOrder(self, info)

This does the same thing as fontDidChangeGlyphOrder but is only called for the current glyph.

currentGlyphFontDidChangeGuidelines(self, info)

This does the same thing as fontDidChangeGuidelines but is only called for the current glyph.

currentGlyphFontInfoDidChange(self, info)

This does the same thing as fontInfoDidChange but is only called for the current glyph.

currentGlyphFontInfoDidChangeValue(self, info)

This does the same thing as fontInfoDidChangeValue but is only called for the current glyph.

currentGlyphFontKerningDidChange(self, info)

This does the same thing as fontKerningDidChange but is only called for the current glyph.

currentGlyphFontKerningDidChangePair(self, info)

This does the same thing as fontKerningDidChangePair but is only called for the current glyph.

currentGlyphFontKerningDidClear(self, info)

This does the same thing as fontKerningDidClear but is only called for the current glyph.

currentGlyphFontKerningDidUpdate(self, info)

This does the same thing as fontKerningDidUpdate but is only called for the current glyph.

currentGlyphFontGroupsDidChange(self, info)

This does the same thing as fontGroupsDidChange but is only called for the current glyph.

currentGlyphFontGroupsDidChangeGroup(self, info)

This does the same thing as fontGroupsDidChangeGroup but is only called for the current glyph.

currentGlyphFontGroupsDidClear(self, info)

This does the same thing as fontGroupsDidClear but is only called for the current glyph.

currentGlyphFontGroupsDidUpdate(self, info)

This does the same thing as fontGroupsDidUpdate but is only called for the current glyph.

currentGlyphFontFeaturesDidChange(self, info)

This does the same thing as fontFeaturesDidChange but is only called for the current glyph.

currentGlyphFontFeaturesDidChangeText(self, info)

This does the same thing as fontFeaturesDidChangeText but is only called for the current glyph.

currentGlyphFontLayersDidChange(self, info)

This does the same thing as fontLayersDidChange but is only called for the current glyph.

currentGlyphFontLayersDidChangeLayer(self, info)

This does the same thing as fontLayersDidChangeLayer but is only called for the current glyph.

currentGlyphFontLayersDidSetDefaultLayer(self, info)

This does the same thing as fontLayersDidSetDefaultLayer but is only called for the current glyph.

currentGlyphFontLayersDidChangeOrder(self, info)

This does the same thing as fontLayersDidChangeOrder but is only called for the current glyph.

currentGlyphFontLayersDidAddLayer(self, info)

This does the same thing as fontLayersDidAddLayer but is only called for the current glyph.

currentGlyphFontLayersDidRemoveLayer(self, info)

This does the same thing as fontLayersDidRemoveLayer but is only called for the current glyph.

currentGlyphFontLayersDidChangeLayerName(self, info)

This does the same thing as fontLayersDidChangeLayerName but is only called for the current glyph.

currentGlyphLayerDidChange(self, info)

This does the same thing as layerDidChange but is only called for the current glyph.

currentGlyphLayerDidChangeGlyphs(self, info)

This does the same thing as layerDidChangeGlyphs but is only called for the current glyph.

currentGlyphLayerDidChangeGlyph(self, info)

This does the same thing as layerDidChangeGlyph but is only called for the current glyph.

currentGlyphLayerDidAddGlyph(self, info)

This does the same thing as layerDidAddGlyph but is only called for the current glyph.

currentGlyphLayerDidRemoveGlyph(self, info)

This does the same thing as layerDidRemoveGlyph but is only called for the current glyph.

currentGlyphLayerDidChangeGlyphName(self, info)

This does the same thing as layerDidChangeGlyphName but is only called for the current glyph.

currentGlyphLayerDidChangeGlyphUnicodes(self, info)

This does the same thing as layerDidChangeGlyphUnicodes but is only called for the current glyph.

currentGlyphLayerDidChangeName(self, info)

This does the same thing as layerDidChangeName but is only called for the current glyph.

currentGlyphLayerDidChangeColor(self, info)

This does the same thing as layerDidChangeColor but is only called for the current glyph.

currentGlyphDidChange(self, info)

This does the same thing as glyphDidChange but is only called for the current glyph.

currentGlyphDidChangeInfo(self, info)

This does the same thing as glyphDidChangeInfo but is only called for the current glyph.

currentGlyphDidChangeMetrics(self, info)

This does the same thing as glyphDidChangeMetrics but is only called for the current glyph.

currentGlyphDidChangeOutline(self, info)

This does the same thing as glyphDidChangeOutline but is only called for the current glyph.

currentGlyphDidChangeContours(self, info)

This does the same thing as glyphDidChangeContours but is only called for the current glyph.

currentGlyphDidChangeComponents(self, info)

This does the same thing as glyphDidChangeComponents but is only called for the current glyph.

currentGlyphDidChangeAnchors(self, info)

This does the same thing as glyphDidChangeAnchors but is only called for the current glyph.

currentGlyphDidChangeGuidelines(self, info)

This does the same thing as glyphDidChangeGuidelines but is only called for the current glyph.

currentGlyphDidChangeImage(self, info)

This does the same thing as glyphDidChangeImage but is only called for the current glyph.

currentGlyphDidChangeSelection(self, info)

This does the same thing as glyphDidChangeSelection but is only called for the current glyph.

currentGlyphDidStartChangeSelection(self, info)

This does the same thing as glyphDidStartChangeSelection but is only called for the current glyph.

currentGlyphDidEndChangeSelection(self, info)

This does the same thing as glyphDidEndChangeSelection but is only called for the current glyph.

currentGlyphDidChangeMeasurements(self, info)

This does the same thing as glyphDidChangeMeasurements but is only called for the current glyph.

Adjunct Objects

adjunctFontDidChange(self, info)

This does the same thing as fontDidChange but is only called for adjunct objects.

adjunctFontDidReloadGlyphs(self, info)

This does the same thing as fontDidReloadGlyphs but is only called for adjunct objects.

adjunctFontDidChangeGlyphOrder(self, info)

This does the same thing as fontDidChangeGlyphOrder but is only called for adjunct objects.

adjunctFontDidChangeGuidelines(self, info)

This does the same thing as fontDidChangeGuidelines but is only called for adjunct objects.

adjunctFontInfoDidChange(self, info)

This does the same thing as fontInfoDidChange but is only called for adjunct objects.

adjunctFontInfoDidChangeValue(self, info)

This does the same thing as fontInfoDidChangeValue but is only called for adjunct objects.

adjunctFontKerningDidChange(self, info)

This does the same thing as fontKerningDidChange but is only called for adjunct objects.

adjunctFontKerningDidChangePair(self, info)

This does the same thing as fontKerningDidChangePair but is only called for adjunct objects.

adjunctFontKerningDidClear(self, info)

This does the same thing as fontKerningDidClear but is only called for adjunct objects.

adjunctFontKerningDidUpdate(self, info)

This does the same thing as fontKerningDidUpdate but is only called for adjunct objects.

adjunctFontGroupsDidChange(self, info)

This does the same thing as fontGroupsDidChange but is only called for adjunct objects.

adjunctFontGroupsDidChangeGroup(self, info)

This does the same thing as fontGroupsDidChangeGroup but is only called for adjunct objects.

adjunctFontGroupsDidClear(self, info)

This does the same thing as fontGroupsDidClear but is only called for adjunct objects.

adjunctFontGroupsDidUpdate(self, info)

This does the same thing as fontGroupsDidUpdate but is only called for adjunct objects.

adjunctFontFeaturesDidChange(self, info)

This does the same thing as fontFeaturesDidChange but is only called for adjunct objects.

adjunctFontFeaturesDidChangeText(self, info)

This does the same thing as fontFeaturesDidChangeText but is only called for adjunct objects.

adjunctFontLayersDidChange(self, info)

This does the same thing as fontLayersDidChange but is only called for adjunct objects.

adjunctFontLayersDidChangeLayer(self, info)

This does the same thing as fontLayersDidChangeLayer but is only called for adjunct objects.

adjunctFontLayersDidSetDefaultLayer(self, info)

This does the same thing as fontLayersDidSetDefaultLayer but is only called for adjunct objects.

adjunctFontLayersDidChangeOrder(self, info)

This does the same thing as fontLayersDidChangeOrder but is only called for adjunct objects.

adjunctFontLayersDidAddLayer(self, info)

This does the same thing as fontLayersDidAddLayer but is only called for adjunct objects.

adjunctFontLayersDidRemoveLayer(self, info)

This does the same thing as fontLayersDidRemoveLayer but is only called for adjunct objects.

adjunctFontLayersDidChangeLayerName(self, info)

This does the same thing as fontLayersDidChangeLayerName but is only called for adjunct objects.

adjunctLayerDidChange(self, info)

This does the same thing as layerDidChange but is only called for adjunct objects.

adjunctLayerDidChangeGlyphs(self, info)

This does the same thing as layerDidChangeGlyphs but is only called for adjunct objects.

adjunctLayerDidChangeGlyph(self, info)

This does the same thing as layerDidChangeGlyph but is only called for adjunct objects.

adjunctLayerDidAddGlyph(self, info)

This does the same thing as layerDidAddGlyph but is only called for adjunct objects.

adjunctLayerDidRemoveGlyph(self, info)

This does the same thing as layerDidRemoveGlyph but is only called for adjunct objects.

adjunctLayerDidChangeGlyphName(self, info)

This does the same thing as layerDidChangeGlyphName but is only called for adjunct objects.

adjunctLayerDidChangeGlyphUnicodes(self, info)

This does the same thing as layerDidChangeGlyphUnicodes but is only called for adjunct objects.

adjunctLayerDidChangeName(self, info)

This does the same thing as layerDidChangeName but is only called for adjunct objects.

adjunctLayerDidChangeColor(self, info)

This does the same thing as layerDidChangeColor but is only called for adjunct objects.

adjunctGlyphDidChange(self, info)

This does the same thing as glyphDidChange but is only called for adjunct objects.

adjunctGlyphDidChangeInfo(self, info)

This does the same thing as glyphDidChangeInfo but is only called for adjunct objects.

adjunctGlyphDidChangeMetrics(self, info)

This does the same thing as glyphDidChangeMetrics but is only called for adjunct objects.

adjunctGlyphDidChangeOutline(self, info)

This does the same thing as glyphDidChangeOutline but is only called for adjunct objects.

adjunctGlyphDidChangeContours(self, info)

This does the same thing as glyphDidChangeContours but is only called for adjunct objects.

adjunctGlyphDidChangeComponents(self, info)

This does the same thing as glyphDidChangeComponents but is only called for adjunct objects.

adjunctGlyphDidChangeAnchors(self, info)

This does the same thing as glyphDidChangeAnchors but is only called for adjunct objects.

adjunctGlyphDidChangeGuidelines(self, info)

This does the same thing as glyphDidChangeGuidelines but is only called for adjunct objects.

adjunctGlyphDidChangeImage(self, info)

This does the same thing as glyphDidChangeImage but is only called for adjunct objects.

adjunctGlyphDidChangeSelection(self, info)

This does the same thing as glyphDidChangeSelection but is only called for adjunct objects.

adjunctGlyphDidStartChangeSelection(self, info)

This does the same thing as glyphDidStartChangeSelection but is only called for adjunct objects.

adjunctGlyphDidEndChangeSelection(self, info)

This does the same thing as glyphDidEndChangeSelection but is only called for adjunct objects.

adjunctGlyphDidChangeMeasurements(self, info)

This does the same thing as glyphDidChangeMeasurements but is only called for adjunct objects.

Inherits from subclass: mojo.subscriber.Subscriber

debug

addAdjunctObjectToObserve(obj)

Add an adjunct object to observe.

addDefconSubscription(subscriberEventName, dispatcher, methodName, eventEligibilityFunction, eventInfoExtractionFunction, lowLevelEventNames, observeAllInstances, delay=0.03333333333333333)

addRoboFontSubscription(subscriberEventName, methodName, lowLevelEventNames, eventEligibilityFunction, eventInfoExtractionFunction, delay=0)

beginDefconSubscriptions(defconObject, identifier=None)

beginRoboFontSubscriptions()

build()

Subclasses implement this method to do any construction necessary before the subscriptions are started.

clearObservedAdjunctObjects()

Clear the adjunct objects being observed.

destroy()

Subclasses implement this method to do any cleanup when this object is terminated.

endDefconSubscriptions(defconObject, identifier=None)

endRoboFontSubscriptions()

getFontOverview()

Get the font overview this object is assigned to.

getGlyphEditor()

Get the glyph editor this object is assigned to.

getIdentifier()

Get a unique identifier for this object.

getIdentifierPattern()

Get a fnmatch compatible identifier pattern that can be used to kill any existing instances of this class during debugging.

getSpaceCenter()

Get the space center this object is assigned to.

removeObservedAdjunctObject(obj)

Remove an adjunct object being observed.

setAdjunctObjectsToObserve(objects)

Set the adjunct objects to observe.

started()

Subclasses implement this method to do any work necessary after the subscriptions are started.

terminate()

Terminate the processes owned by this object. Subclasses should not override this.

class WindowController()

Inherits from subclass: mojo.subscriber.WindowController

getWindow()

showAsk(messageText, informativeText, buttonTitles, callback=None, alertStyle='informational', icon=None, accessoryView=None, helpCallback=None)

showAskYesNo(messageText, informativeText, callback=None, alertStyle='informational', icon=None, accessoryView=None, helpCallback=None)

showGetFile(fileTypes, callback, allowsMultipleSelection=False, messageText=None, title=None, directory=None, fileName=None, accessoryView=None)

showGetFolder(callback, messageText=None, title=None, directory=None, allowsMultipleSelection=False, accessoryView=None)

showMessage(messageText, informativeText, callback=None, alertStyle='informational', icon=None, accessoryView=None, helpCallback=None)

showPutFile(fileTypes, callback, fileName=None, directory=None, accessoryView=None, messageText=None, title=None, canCreateDirectories=True)

startProgress(text='', tickCount=None, useSheet=True)

windowWillClose(sender)

class disableSubscriberEvents()

Prevent subscriber to send any notification, usage ‘with disableSubscriberEvents():’.

from mojo.subscriber import Subscriber, registerGlyphEditorSubscriber, disableSubscriberEvents

class RecursionStopper(Subscriber):

    debug = True

    def glyphEditorGlyphDidChange(self, info):
        print("glyphEditorGlyphDidChange")
        glyph = info["glyph"]
        with disableSubscriberEvents():
            if glyph.width < 1000:
                glyph.width += 1

registerGlyphEditorSubscriber(RecursionStopper)
Inherits from subclass: mojo.subscriber.disableSubscriberEvents

isDisabled

Last edited on 30/09/2024