mojo.subscriber

getRegisteredSubscriberEvents()

A dictionary of all registered subscriber events.

registerSubscriberEvent(subscriberEventName, methodName, lowLevelEventNames, dispatcher, 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.
  • 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 functions 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 subsriber subclass 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 subsriber subclass 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 subsriber subclass 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 subsriber subclass 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 subsriber subclass instance.

class Subscriber()

This class allows you to easily subscribe to events within RoboFont. You indicate what events you want to subscribe to by implementing methods that correspond to events.

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)

Methods

The built-in RoboFont event methods are:

  • roboFontDidFinishLaunching : This will be called when a mojo.events applicationDidFinishLaunching event is posted. Default delay: 0.000 seconds.

  • roboFontDidBecomeActive : This will be called when a mojo.events applicationDidBecomeActive event is posted. Default delay: 0.000 seconds.

  • roboFontWillResignActive : This will be called when a mojo.events applicationWillResignActive event is posted. Default delay: 0.000 seconds.

  • roboFontDidChangeScreen : This will be called when a mojo.events applicationScreenChanged event is posted. Default delay: 0.000 seconds.

  • roboFontWillTerminate : This will be called when a mojo.events applicationWillTerminate event is posted. Default delay: 0.000 seconds.

  • roboFontWantsOpenUnknownFileType : This will be called when a mojo.events applicationOpenFile event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • fileHandler
    • fileExtension
    • path

  • roboFontDidSwitchCurrentGlyph : This will be called when a mojo.events currentGlyphChanged event is posted. Default delay: 0.000 seconds.

  • roboFontDidBuildExtension : This will be called when a mojo.events extensionDidGenerate event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • path

  • roboFontWillRunExternalScript : This will be called when a mojo.events externalLaunchEvent event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • data

  • roboFontWantsInspectorViews : This will be called when a mojo.events inspectorWindowWillShowDescriptions event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • viewDescriptions

  • roboFontWantsNamespaceAdditions : This will be called when a mojo.events namespaceCallbacks event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • namespace

  • roboFontDidChangePreferences : This will be called when a mojo.events preferencesChanged event is posted. Default delay: 0.000 seconds.

  • currentFontDidSetFont : Called when the current font is set.
  • fontDocumentWillOpenNew : This will be called when a mojo.events newFontWillOpen event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • font

  • fontDocumentDidOpenNew : This will be called when a mojo.events newFontDidOpen event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • font

  • fontDocumentWillOpenBinaryFont : This will be called when a mojo.events binaryFontWillOpen event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • font
    • format
    • source

  • fontDocumentWillOpen : This will be called when a mojo.events fontWillOpen event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • font

  • fontDocumentDidOpen : This will be called when a mojo.events fontDidOpen event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • font

  • fontDocumentWillSave : This will be called when a mojo.events fontWillSave event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • font
    • path

  • fontDocumentDidSave : This will be called when a mojo.events fontDidSave event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • font
    • path

  • fontDocumentWillAutoSave : This will be called when a mojo.events fontWillAutoSave event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • font

  • fontDocumentDidAutoSave : This will be called when a mojo.events fontDidAutoSave event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • font

  • fontDocumentWillGenerate : This will be called when a mojo.events fontWillGenerate event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • font
    • testInstall
    • format
    • path
    • layerName

  • fontDocumentDidGenerate : This will be called when a mojo.events fontDidGenerate event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • font
    • format
    • path
    • layerName

  • fontDocumentWillTestInstall : This will be called when a mojo.events fontWillTestInstall event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • font
    • success
    • format
    • report

  • fontDocumentDidTestInstall : This will be called when a mojo.events fontDidTestInstall event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • font
    • format

  • fontDocumentWillTestDeinstall : This will be called when a mojo.events fontWillTestDeinstall event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • font

  • fontDocumentDidTestDeinstall : This will be called when a mojo.events fontDidTestDeinstall event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • font

  • fontDocumentDidChangeExternally : This will be called when a mojo.events fontDidChangeExternally event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • font

  • fontDocumentDidBecomeCurrent : This will be called when a mojo.events fontBecameCurrent event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • font

  • fontDocumentDidResignCurrent : This will be called when a mojo.events fontResignCurrent event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • font

  • fontDocumentWillClose : This will be called when a mojo.events fontWillClose event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • font

  • fontDocumentDidClose : This will be called when a mojo.events fontDidClose event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • font

  • fontDocumentWindowDidOpen : This will be called when a mojo.events fontWindowDidOpen event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • font

  • fontDocumentWindowWillOpen : This will be called when a mojo.events fontWindowWillOpen event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • font

  • fontDocumentWantsToolbarItems : This will be called when a mojo.events fontWindowWillShowToolbarItems event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • font
    • singleWindowMode
    • itemDescriptions

  • fontOverviewWillOpen : This will be called when a mojo.events fontOverviewWillOpen event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • fontOverview
    • font

  • fontOverviewDidOpen : This will be called when a mojo.events fontOverviewDidOpen event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • fontOverview
    • font

  • fontOverviewWillClose : This will be called when a mojo.events fontOverviewWillClose event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • fontOverview
    • font

  • fontOverviewDidCopy : This will be called when a mojo.events fontOverviewCopy event is posted. Default delay: 0.000 seconds.

  • fontOverviewDidRedo : This will be called when a mojo.events fontOverViewRedo event is posted. Default delay: 0.000 seconds.

  • fontOverviewDidUndo : This will be called when a mojo.events fontOverViewUndo event is posted. Default delay: 0.000 seconds.

  • fontOverviewDidPaste : This will be called when a mojo.events fontOverviewPaste event is posted. Default delay: 0.000 seconds.

  • fontOverviewWantsContextualMenuItems : This will be called when a mojo.events fontOverviewAdditionContextualMenuItems event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • itemDescriptions

  • currentGlyphDidSetGlyph : Called when the current glyph is set.
  • glyphEditorWillOpen : This will be called when a mojo.events glyphWindowWillOpen event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • glyph
    • glyphEditor

  • glyphEditorDidOpen : This will be called when a mojo.events glyphWindowDidOpen event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • glyph
    • glyphEditor

  • glyphEditorWillClose : This will be called when a mojo.events glyphWindowWillClose event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • glyph
    • glyphEditor

  • glyphEditorWillSetGlyph : This will be called when a mojo.events viewWillChangeGlyph event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • glyph
    • glyphEditor

  • glyphEditorDidSetGlyph : This will be called when a mojo.events viewDidChangeGlyph event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • glyph
    • glyphEditor

  • glyphEditorDidKeyDown : This will be called when a mojo.events keyDown event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • glyph
    • glyphEditor
    • locationInGlyph
    • deviceState
    • NSEvent

  • glyphEditorDidKeyUp : This will be called when a mojo.events keyUp event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • glyph
    • glyphEditor
    • locationInGlyph
    • deviceState
    • NSEvent

  • glyphEditorDidChangeModifiers : This will be called when a mojo.events modifiersChanged event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • glyph
    • glyphEditor
    • locationInGlyph
    • deviceState
    • NSEvent

  • glyphEditorDidMouseDown : This will be called when a mojo.events mouseDown event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • glyph
    • glyphEditor
    • locationInGlyph
    • deviceState
    • NSEvent

  • glyphEditorDidMouseUp : This will be called when a mojo.events mouseUp event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

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

  • glyphEditorDidMouseMove : This will be called when a mojo.events mouseMoved event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

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

  • glyphEditorDidMouseDrag : This will be called when a mojo.events mouseDragged event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

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

  • glyphEditorDidRightMouseDown : This will be called when a mojo.events rightMouseDown event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • glyph
    • glyphEditor
    • locationInGlyph
    • deviceState
    • NSEvent

  • glyphEditorDidRightMouseDrag : This will be called when a mojo.events rightMouseDragged event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

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

  • glyphEditorDidRightMouseUp : This will be called when a mojo.events rightMouseUp event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

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

  • glyphEditorDidScale : This will be called when a mojo.events viewDidChangeScale event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • glyph
    • glyphEditor
    • scale

  • glyphEditorWillScale : This will be called when a mojo.events viewWillChangeScale event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • glyph
    • glyphEditor
    • scale

  • glyphEditorDidCopy : This will be called when a mojo.events copy event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • glyph
    • glyphEditor
    • locationInGlyph
    • deviceState
    • NSEvent

  • glyphEditorDidCopyAsComponent : This will be called when a mojo.events copyAsComponent event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • glyph
    • glyphEditor
    • locationInGlyph
    • deviceState
    • NSEvent

  • glyphEditorDidCut : This will be called when a mojo.events cut event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • glyph
    • glyphEditor
    • locationInGlyph
    • deviceState
    • NSEvent

  • glyphEditorDidPaste : This will be called when a mojo.events paste event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • glyph
    • glyphEditor
    • locationInGlyph
    • deviceState
    • NSEvent

  • glyphEditorDidPasteSpecial : This will be called when a mojo.events pasteSpecial event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • glyph
    • glyphEditor
    • locationInGlyph
    • deviceState
    • NSEvent

  • glyphEditorDidDelete : This will be called when a mojo.events delete event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • glyph
    • glyphEditor
    • locationInGlyph
    • deviceState
    • NSEvent

  • glyphEditorDidSelectAll : This will be called when a mojo.events selectAll event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • glyph
    • glyphEditor
    • locationInGlyph
    • deviceState
    • NSEvent

  • glyphEditorDidSelectAllAlternate : This will be called when a mojo.events selectAllAlternate event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • glyph
    • glyphEditor
    • locationInGlyph
    • deviceState
    • NSEvent

  • glyphEditorDidSelectAllControl : This will be called when a mojo.events selectAllControl event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • glyph
    • glyphEditor
    • locationInGlyph
    • deviceState
    • NSEvent

  • glyphEditorDidDeselectAll : This will be called when a mojo.events deselectAll event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • glyph
    • glyphEditor
    • locationInGlyph
    • deviceState
    • NSEvent

  • glyphEditorDidAddUndoItem : This will be called when a mojo.events addedUndoItem event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • glyph
    • glyphEditor
    • locationInGlyph
    • deviceState
    • NSEvent

  • glyphEditorDidUndo : This will be called when a mojo.events didUndo event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

    • glyph
    • glyphEditor
    • locationInGlyph
    • deviceState
    • NSEvent

  • glyphEditorWantsContextualMenuItems : This will be called when a mojo.events glyphAdditionContextualMenuItems event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

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

  • glyphEditorWantsPointContexualMenuItems : This will be called when a mojo.events pointAdditionContextualMenuItems event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

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

  • glyphEditorWantsAnchorContextualMenuItems : This will be called when a mojo.events anchorAdditionContextualMenuItems event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

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

  • glyphEditorWantsGuidelineContextualMenuItems : This will be called when a mojo.events guideAdditionContextualMenuItems event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

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

  • glyphEditorWantsImageContextualMenuItems : This will be called when a mojo.events imageAdditionContextualMenuItems event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

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

  • glyphEditorWantsToolbarItems : This will be called when a mojo.events glyphWindowWillShowToolbarItems event is posted. Default delay: 0.000 seconds.

    Info Dictionary contains:

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

  • spaceCenterWillOpen : This will be called when a mojo.events spaceCenterWillOpen event is posted. Default delay: 0.000 seconds.

  • spaceCenterDidOpen : This will be called when a mojo.events spaceCenterDidOpen event is posted. Default delay: 0.000 seconds.

  • spaceCenterWillClose : This will be called when a mojo.events spaceCenterWillClose event is posted. Default delay: 0.000 seconds.

  • spaceCenterDidKeyDown : This will be called when a mojo.events spaceCenterKeyDown event is posted. Default delay: 0.000 seconds.

  • spaceCenterDidKeyUp : This will be called when a mojo.events spaceCenterKeyUp event is posted. Default delay: 0.000 seconds.

  • spaceCenterDidChangeSelection : This will be called when a mojo.events spaceCenterSelectionChanged event is posted. Default delay: 0.000 seconds.

  • spaceCenterDidChangeText : This will be called when a mojo.events spaceCenterInputChanged event is posted. Default delay: 0.000 seconds.

  • spaceCenterWantsContextualMenuItems : This will be called when a mojo.events spaceCenterAdditionContextualMenuItems event is posted. Default delay: 0.000 seconds.

The built-in object event methods are:

  • fontDidChange : This will be called when any of Font.Changed are posted. Default delay: 0.033 seconds.

  • fontDidReloadGlyphs : This will be called when any of Font.ReloadedGlyphs are posted. Default delay: 0.033 seconds.

  • fontDidChangeGlyphOrder : This will be called when any of Font.GlyphOrderChanged are posted. Default delay: 0.033 seconds.

  • fontDidChangeGuidelines : This will be called when any of Font.GuidelinesChanged are posted. Default delay: 0.033 seconds.

  • fontInfoDidChange : This will be called when any of Info.Changed are posted. Default delay: 0.033 seconds.

  • fontInfoDidChangeValue : This will be called when any of Info.ValueChanged are posted. Default delay: 0.033 seconds.

  • fontKerningDidChange : This will be called when any of Kerning.Changed are posted. Default delay: 0.033 seconds.

  • fontKerningDidChangePair : This will be called when any of Kerning.PairSet, Kerning.PairDeleted are posted. Default delay: 0.033 seconds.

  • fontKerningDidClear : This will be called when any of Kerning.Cleared are posted. Default delay: 0.033 seconds.

  • fontKerningDidUpdate : This will be called when any of Kerning.Updated are posted. Default delay: 0.033 seconds.

  • fontGroupsDidChange : This will be called when any of Groups.Changed are posted. Default delay: 0.033 seconds.

  • fontGroupsDidChangeGroup : This will be called when any of Groups.GroupSet, Groups.GroupDeleted are posted. Default delay: 0.033 seconds.

  • fontGroupsDidClear : This will be called when any of Groups.Cleared are posted. Default delay: 0.033 seconds.

  • fontGroupsDidUpdate : This will be called when any of Groups.Updated are posted. Default delay: 0.033 seconds.

  • fontFeaturesDidChange : This will be called when any of Features.Changed are posted. Default delay: 0.033 seconds.

  • fontFeaturesDidChangeText : This will be called when any of Features.TextChanged are posted. Default delay: 0.033 seconds.

  • fontLayersDidChange : This will be called when any of LayerSet.LayersChanged are posted. Default delay: 0.033 seconds.

  • fontLayersDidChangeLayer : This will be called when any of LayerSet.LayerChanged are posted. Default delay: 0.033 seconds.

  • fontLayersDidSetDefaultLayer : This will be called when any of LayerSet.DefaultLayerChanged are posted. Default delay: 0.033 seconds.

  • fontLayersDidChangeOrder : This will be called when any of LayerSet.LayerOrderChanged are posted. Default delay: 0.033 seconds.

  • fontLayersDidAddLayer : This will be called when any of LayerSet.LayerAdded are posted. Default delay: 0.033 seconds.

  • fontLayersDidRemoveLayer : This will be called when any of LayerSet.LayerDeleted are posted. Default delay: 0.033 seconds.

  • fontLayersDidChangeLayerName : This will be called when any of LayerSet.LayerNameChanged are posted. Default delay: 0.033 seconds.

  • layerDidChange : This will be called when any of Layer.Changed are posted. Default delay: 0.033 seconds.

  • layerDidChangeGlyphs : This will be called when any of Layer.GlyphsChanged are posted. Default delay: 0.033 seconds.

  • layerDidChangeGlyph : This will be called when any of Layer.GlyphChanged are posted. Default delay: 0.033 seconds.

  • layerDidAddGlyph : This will be called when any of Layer.GlyphAdded are posted. Default delay: 0.033 seconds.

  • layerDidRemoveGlyph : This will be called when any of Layer.GlyphDeleted are posted. Default delay: 0.033 seconds.

  • layerDidChangeGlyphName : This will be called when any of Layer.GlyphNameChanged are posted. Default delay: 0.033 seconds.

  • layerDidChangeGlyphUnicodes : This will be called when any of Layer.GlyphUnicodesChanged are posted. Default delay: 0.033 seconds.

  • layerDidChangeName : This will be called when any of Layer.NameChanged are posted. Default delay: 0.033 seconds.

  • layerDidChangeColor : This will be called when any of Layer.ColorChanged are posted. Default delay: 0.033 seconds.

  • glyphDidChange : This will be called when any of Glyph.Changed are posted. Default delay: 0.033 seconds.

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

  • glyphDidChangeMetrics : 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: 0.033 seconds.

  • glyphDidChangeOutline : This will be called when any of Glyph.ContoursChanged, Glyph.ComponentsChanged are posted. Default delay: 0.033 seconds.

  • glyphDidChangeContours : This will be called when any of Glyph.ContoursChanged are posted. Default delay: 0.033 seconds.

  • glyphDidChangeComponents : This will be called when any of Glyph.ComponentsChanged are posted. Default delay: 0.033 seconds.

  • glyphDidChangeAnchors : This will be called when any of Glyph.AnchorsChanged are posted. Default delay: 0.033 seconds.

  • glyphDidChangeGuidelines : This will be called when any of Glyph.GuidelinesChanged are posted. Default delay: 0.033 seconds.

  • glyphDidChangeImage : This will be called when any of Glyph.ImageChanged are posted. Default delay: 0.033 seconds.

  • glyphDidChangeSelection : This will be called when any of Glyph.SelectionChanged are posted. Default delay: 0.033 seconds.

  • glyphDidStartChangeSelection : This will be called when any of Glyph.SelectionStarted are posted. Default delay: 0.000 seconds.

  • glyphDidEndChangeSelection : This will be called when any of Glyph.SelectionEnded are posted. Default delay: 0.000 seconds.

  • glyphDidChangeMeasurements : This will be called when any of Glyph.MeasurementAdded, Glyph.MeasurementsCleared, Glyph.MeasurementChanged are posted. Default delay: 0.033 seconds.

  • glyphEditorFontDidChange : This does the same thing as glyphEditorFontDidChange but is only called for the glyph in the glyph editor.

  • glyphEditorFontDidReloadGlyphs : This does the same thing as glyphEditorFontDidReloadGlyphs but is only called for the glyph in the glyph editor.

  • glyphEditorFontDidChangeGlyphOrder : This does the same thing as glyphEditorFontDidChangeGlyphOrder but is only called for the glyph in the glyph editor.

  • glyphEditorFontDidChangeGuidelines : This does the same thing as glyphEditorFontDidChangeGuidelines but is only called for the glyph in the glyph editor.

  • glyphEditorFontInfoDidChange : This does the same thing as glyphEditorFontInfoDidChange but is only called for the glyph in the glyph editor.

  • glyphEditorFontInfoDidChangeValue : This does the same thing as glyphEditorFontInfoDidChangeValue but is only called for the glyph in the glyph editor.

  • glyphEditorFontKerningDidChange : This does the same thing as glyphEditorFontKerningDidChange but is only called for the glyph in the glyph editor.

  • glyphEditorFontKerningDidChangePair : This does the same thing as glyphEditorFontKerningDidChangePair but is only called for the glyph in the glyph editor.

  • glyphEditorFontKerningDidClear : This does the same thing as glyphEditorFontKerningDidClear but is only called for the glyph in the glyph editor.

  • glyphEditorFontKerningDidUpdate : This does the same thing as glyphEditorFontKerningDidUpdate but is only called for the glyph in the glyph editor.

  • glyphEditorFontGroupsDidChange : This does the same thing as glyphEditorFontGroupsDidChange but is only called for the glyph in the glyph editor.

  • glyphEditorFontGroupsDidChangeGroup : This does the same thing as glyphEditorFontGroupsDidChangeGroup but is only called for the glyph in the glyph editor.

  • glyphEditorFontGroupsDidClear : This does the same thing as glyphEditorFontGroupsDidClear but is only called for the glyph in the glyph editor.

  • glyphEditorFontGroupsDidUpdate : This does the same thing as glyphEditorFontGroupsDidUpdate but is only called for the glyph in the glyph editor.

  • glyphEditorFontFeaturesDidChange : This does the same thing as glyphEditorFontFeaturesDidChange but is only called for the glyph in the glyph editor.

  • glyphEditorFontFeaturesDidChangeText : This does the same thing as glyphEditorFontFeaturesDidChangeText but is only called for the glyph in the glyph editor.

  • glyphEditorFontLayersDidChange : This does the same thing as glyphEditorFontLayersDidChange but is only called for the glyph in the glyph editor.

  • glyphEditorFontLayersDidChangeLayer : This does the same thing as glyphEditorFontLayersDidChangeLayer but is only called for the glyph in the glyph editor.

  • glyphEditorFontLayersDidSetDefaultLayer : This does the same thing as glyphEditorFontLayersDidSetDefaultLayer but is only called for the glyph in the glyph editor.

  • glyphEditorFontLayersDidChangeOrder : This does the same thing as glyphEditorFontLayersDidChangeOrder but is only called for the glyph in the glyph editor.

  • glyphEditorFontLayersDidAddLayer : This does the same thing as glyphEditorFontLayersDidAddLayer but is only called for the glyph in the glyph editor.

  • glyphEditorFontLayersDidRemoveLayer : This does the same thing as glyphEditorFontLayersDidRemoveLayer but is only called for the glyph in the glyph editor.

  • glyphEditorFontLayersDidChangeLayerName : This does the same thing as glyphEditorFontLayersDidChangeLayerName but is only called for the glyph in the glyph editor.

  • glyphEditorLayerDidChange : This does the same thing as glyphEditorLayerDidChange but is only called for the glyph in the glyph editor.

  • glyphEditorLayerDidChangeGlyphs : This does the same thing as glyphEditorLayerDidChangeGlyphs but is only called for the glyph in the glyph editor.

  • glyphEditorLayerDidChangeGlyph : This does the same thing as glyphEditorLayerDidChangeGlyph but is only called for the glyph in the glyph editor.

  • glyphEditorLayerDidAddGlyph : This does the same thing as glyphEditorLayerDidAddGlyph but is only called for the glyph in the glyph editor.

  • glyphEditorLayerDidRemoveGlyph : This does the same thing as glyphEditorLayerDidRemoveGlyph but is only called for the glyph in the glyph editor.

  • glyphEditorLayerDidChangeGlyphName : This does the same thing as glyphEditorLayerDidChangeGlyphName but is only called for the glyph in the glyph editor.

  • glyphEditorLayerDidChangeGlyphUnicodes : This does the same thing as glyphEditorLayerDidChangeGlyphUnicodes but is only called for the glyph in the glyph editor.

  • glyphEditorLayerDidChangeName : This does the same thing as glyphEditorLayerDidChangeName but is only called for the glyph in the glyph editor.

  • glyphEditorLayerDidChangeColor : This does the same thing as glyphEditorLayerDidChangeColor but is only called for the glyph in the glyph editor.

  • glyphEditorGlyphDidChange : This does the same thing as glyphEditorGlyphDidChange but is only called for the glyph in the glyph editor.

  • glyphEditorGlyphDidChangeInfo : This does the same thing as glyphEditorGlyphDidChangeInfo but is only called for the glyph in the glyph editor.

  • glyphEditorGlyphDidChangeMetrics : This does the same thing as glyphEditorGlyphDidChangeMetrics but is only called for the glyph in the glyph editor.

  • glyphEditorGlyphDidChangeOutline : This does the same thing as glyphEditorGlyphDidChangeOutline but is only called for the glyph in the glyph editor.

  • glyphEditorGlyphDidChangeContours : This does the same thing as glyphEditorGlyphDidChangeContours but is only called for the glyph in the glyph editor.

  • glyphEditorGlyphDidChangeComponents : This does the same thing as glyphEditorGlyphDidChangeComponents but is only called for the glyph in the glyph editor.

  • glyphEditorGlyphDidChangeAnchors : This does the same thing as glyphEditorGlyphDidChangeAnchors but is only called for the glyph in the glyph editor.

  • glyphEditorGlyphDidChangeGuidelines : This does the same thing as glyphEditorGlyphDidChangeGuidelines but is only called for the glyph in the glyph editor.

  • glyphEditorGlyphDidChangeImage : This does the same thing as glyphEditorGlyphDidChangeImage but is only called for the glyph in the glyph editor.

  • glyphEditorGlyphDidChangeSelection : This does the same thing as glyphEditorGlyphDidChangeSelection but is only called for the glyph in the glyph editor.

  • glyphEditorGlyphDidStartChangeSelection : This does the same thing as glyphEditorGlyphDidStartChangeSelection but is only called for the glyph in the glyph editor.

  • glyphEditorGlyphDidEndChangeSelection : This does the same thing as glyphEditorGlyphDidEndChangeSelection but is only called for the glyph in the glyph editor.

  • glyphEditorGlyphDidChangeMeasurements : This does the same thing as glyphEditorGlyphDidChangeMeasurements but is only called for the glyph in the glyph editor.

  • currentFontDidChange : This does the same thing as currentFontDidChange but is only called for the current font.

  • currentFontDidReloadGlyphs : This does the same thing as currentFontDidReloadGlyphs but is only called for the current font.

  • currentFontDidChangeGlyphOrder : This does the same thing as currentFontDidChangeGlyphOrder but is only called for the current font.

  • currentFontDidChangeGuidelines : This does the same thing as currentFontDidChangeGuidelines but is only called for the current font.

  • currentFontInfoDidChange : This does the same thing as currentFontInfoDidChange but is only called for the current font.

  • currentFontInfoDidChangeValue : This does the same thing as currentFontInfoDidChangeValue but is only called for the current font.

  • currentFontKerningDidChange : This does the same thing as currentFontKerningDidChange but is only called for the current font.

  • currentFontKerningDidChangePair : This does the same thing as currentFontKerningDidChangePair but is only called for the current font.

  • currentFontKerningDidClear : This does the same thing as currentFontKerningDidClear but is only called for the current font.

  • currentFontKerningDidUpdate : This does the same thing as currentFontKerningDidUpdate but is only called for the current font.

  • currentFontGroupsDidChange : This does the same thing as currentFontGroupsDidChange but is only called for the current font.

  • currentFontGroupsDidChangeGroup : This does the same thing as currentFontGroupsDidChangeGroup but is only called for the current font.

  • currentFontGroupsDidClear : This does the same thing as currentFontGroupsDidClear but is only called for the current font.

  • currentFontGroupsDidUpdate : This does the same thing as currentFontGroupsDidUpdate but is only called for the current font.

  • currentFontFeaturesDidChange : This does the same thing as currentFontFeaturesDidChange but is only called for the current font.

  • currentFontFeaturesDidChangeText : This does the same thing as currentFontFeaturesDidChangeText but is only called for the current font.

  • currentFontLayersDidChange : This does the same thing as currentFontLayersDidChange but is only called for the current font.

  • currentFontLayersDidChangeLayer : This does the same thing as currentFontLayersDidChangeLayer but is only called for the current font.

  • currentFontLayersDidSetDefaultLayer : This does the same thing as currentFontLayersDidSetDefaultLayer but is only called for the current font.

  • currentFontLayersDidChangeOrder : This does the same thing as currentFontLayersDidChangeOrder but is only called for the current font.

  • currentFontLayersDidAddLayer : This does the same thing as currentFontLayersDidAddLayer but is only called for the current font.

  • currentFontLayersDidRemoveLayer : This does the same thing as currentFontLayersDidRemoveLayer but is only called for the current font.

  • currentFontLayersDidChangeLayerName : This does the same thing as currentFontLayersDidChangeLayerName but is only called for the current font.

  • currentGlyphFontDidChange : This does the same thing as currentGlyphFontDidChange but is only called for the current glyph.

  • currentGlyphFontDidReloadGlyphs : This does the same thing as currentGlyphFontDidReloadGlyphs but is only called for the current glyph.

  • currentGlyphFontDidChangeGlyphOrder : This does the same thing as currentGlyphFontDidChangeGlyphOrder but is only called for the current glyph.

  • currentGlyphFontDidChangeGuidelines : This does the same thing as currentGlyphFontDidChangeGuidelines but is only called for the current glyph.

  • currentGlyphFontInfoDidChange : This does the same thing as currentGlyphFontInfoDidChange but is only called for the current glyph.

  • currentGlyphFontInfoDidChangeValue : This does the same thing as currentGlyphFontInfoDidChangeValue but is only called for the current glyph.

  • currentGlyphFontKerningDidChange : This does the same thing as currentGlyphFontKerningDidChange but is only called for the current glyph.

  • currentGlyphFontKerningDidChangePair : This does the same thing as currentGlyphFontKerningDidChangePair but is only called for the current glyph.

  • currentGlyphFontKerningDidClear : This does the same thing as currentGlyphFontKerningDidClear but is only called for the current glyph.

  • currentGlyphFontKerningDidUpdate : This does the same thing as currentGlyphFontKerningDidUpdate but is only called for the current glyph.

  • currentGlyphFontGroupsDidChange : This does the same thing as currentGlyphFontGroupsDidChange but is only called for the current glyph.

  • currentGlyphFontGroupsDidChangeGroup : This does the same thing as currentGlyphFontGroupsDidChangeGroup but is only called for the current glyph.

  • currentGlyphFontGroupsDidClear : This does the same thing as currentGlyphFontGroupsDidClear but is only called for the current glyph.

  • currentGlyphFontGroupsDidUpdate : This does the same thing as currentGlyphFontGroupsDidUpdate but is only called for the current glyph.

  • currentGlyphFontFeaturesDidChange : This does the same thing as currentGlyphFontFeaturesDidChange but is only called for the current glyph.

  • currentGlyphFontFeaturesDidChangeText : This does the same thing as currentGlyphFontFeaturesDidChangeText but is only called for the current glyph.

  • currentGlyphFontLayersDidChange : This does the same thing as currentGlyphFontLayersDidChange but is only called for the current glyph.

  • currentGlyphFontLayersDidChangeLayer : This does the same thing as currentGlyphFontLayersDidChangeLayer but is only called for the current glyph.

  • currentGlyphFontLayersDidSetDefaultLayer : This does the same thing as currentGlyphFontLayersDidSetDefaultLayer but is only called for the current glyph.

  • currentGlyphFontLayersDidChangeOrder : This does the same thing as currentGlyphFontLayersDidChangeOrder but is only called for the current glyph.

  • currentGlyphFontLayersDidAddLayer : This does the same thing as currentGlyphFontLayersDidAddLayer but is only called for the current glyph.

  • currentGlyphFontLayersDidRemoveLayer : This does the same thing as currentGlyphFontLayersDidRemoveLayer but is only called for the current glyph.

  • currentGlyphFontLayersDidChangeLayerName : This does the same thing as currentGlyphFontLayersDidChangeLayerName but is only called for the current glyph.

  • currentGlyphLayerDidChange : This does the same thing as currentGlyphLayerDidChange but is only called for the current glyph.

  • currentGlyphLayerDidChangeGlyphs : This does the same thing as currentGlyphLayerDidChangeGlyphs but is only called for the current glyph.

  • currentGlyphLayerDidChangeGlyph : This does the same thing as currentGlyphLayerDidChangeGlyph but is only called for the current glyph.

  • currentGlyphLayerDidAddGlyph : This does the same thing as currentGlyphLayerDidAddGlyph but is only called for the current glyph.

  • currentGlyphLayerDidRemoveGlyph : This does the same thing as currentGlyphLayerDidRemoveGlyph but is only called for the current glyph.

  • currentGlyphLayerDidChangeGlyphName : This does the same thing as currentGlyphLayerDidChangeGlyphName but is only called for the current glyph.

  • currentGlyphLayerDidChangeGlyphUnicodes : This does the same thing as currentGlyphLayerDidChangeGlyphUnicodes but is only called for the current glyph.

  • currentGlyphLayerDidChangeName : This does the same thing as currentGlyphLayerDidChangeName but is only called for the current glyph.

  • currentGlyphLayerDidChangeColor : This does the same thing as currentGlyphLayerDidChangeColor but is only called for the current glyph.

  • currentGlyphDidChange : This does the same thing as currentGlyphDidChange but is only called for the current glyph.

  • currentGlyphDidChangeInfo : This does the same thing as currentGlyphDidChangeInfo but is only called for the current glyph.

  • currentGlyphDidChangeMetrics : This does the same thing as currentGlyphDidChangeMetrics but is only called for the current glyph.

  • currentGlyphDidChangeOutline : This does the same thing as currentGlyphDidChangeOutline but is only called for the current glyph.

  • currentGlyphDidChangeContours : This does the same thing as currentGlyphDidChangeContours but is only called for the current glyph.

  • currentGlyphDidChangeComponents : This does the same thing as currentGlyphDidChangeComponents but is only called for the current glyph.

  • currentGlyphDidChangeAnchors : This does the same thing as currentGlyphDidChangeAnchors but is only called for the current glyph.

  • currentGlyphDidChangeGuidelines : This does the same thing as currentGlyphDidChangeGuidelines but is only called for the current glyph.

  • currentGlyphDidChangeImage : This does the same thing as currentGlyphDidChangeImage but is only called for the current glyph.

  • currentGlyphDidChangeSelection : This does the same thing as currentGlyphDidChangeSelection but is only called for the current glyph.

  • currentGlyphDidStartChangeSelection : This does the same thing as currentGlyphDidStartChangeSelection but is only called for the current glyph.

  • currentGlyphDidEndChangeSelection : This does the same thing as currentGlyphDidEndChangeSelection but is only called for the current glyph.

  • currentGlyphDidChangeMeasurements : This does the same thing as currentGlyphDidChangeMeasurements but is only called for the current glyph.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Method 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.

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.033’.

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)

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.

Inherits from subclass: mojo.subscriber.Subscriber

debug

addAdjunctObjectToObserve(obj)

Add an adjunct object to observe.

addDefconSubscription(subscriberEventName, dispatcher, methodName, eventEligibilityFunction, eventInfoExtractionFunction, lowLevelEventNames, 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)

Last edited on 02/08/2021