mojo.subscriber
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 bydispatcher
. 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
: IfTrue
lowLevelEventNames
will be observed for all instances. This only applies to defcondefcon.Font
,defcon.LayerSet
anddefcon.Layer
objects and it is accomplished by sendingNone
as the observable with thelowLevelEventNames
to the low level defcon dispatcher. This should be used sparingly as it can cause a significant number of calls to Subscriber instances that implementmethodName
.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.
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.
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.
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.
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.
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.
listRegisteredSubscribers(subscriberClassName=None)
Return a list of initiated registered Subscriber instances.
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.eventsapplicationDidFinishLaunching
event is posted. Default delay: 0.000 seconds. -
roboFontDidBecomeActive
: This will be called when a mojo.eventsapplicationDidBecomeActive
event is posted. Default delay: 0.000 seconds. -
roboFontWillResignActive
: This will be called when a mojo.eventsapplicationWillResignActive
event is posted. Default delay: 0.000 seconds. -
roboFontDidChangeScreen
: This will be called when a mojo.eventsapplicationScreenChanged
event is posted. Default delay: 0.000 seconds. -
roboFontWillTerminate
: This will be called when a mojo.eventsapplicationWillTerminate
event is posted. Default delay: 0.000 seconds. -
roboFontWantsOpenUnknownFileType
: This will be called when a mojo.eventsapplicationOpenFile
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- fileHandler
- fileExtension
- path
-
roboFontDidSwitchCurrentGlyph
: This will be called when a mojo.eventscurrentGlyphChanged
event is posted. Default delay: 0.000 seconds. -
roboFontDidBuildExtension
: This will be called when a mojo.eventsextensionDidGenerate
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- path
-
roboFontWillRunExternalScript
: This will be called when a mojo.eventsexternalLaunchEvent
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- data
-
roboFontWantsInspectorViews
: This will be called when a mojo.eventsinspectorWindowWillShowDescriptions
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- viewDescriptions
-
roboFontWantsNamespaceAdditions
: This will be called when a mojo.eventsnamespaceCallbacks
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- namespace
-
roboFontDidChangePreferences
: This will be called when a mojo.eventspreferencesChanged
event is posted. Default delay: 0.000 seconds. currentFontDidSetFont
: Called when the current font is set.-
fontDocumentWillOpenNew
: This will be called when a mojo.eventsnewFontWillOpen
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- font
-
fontDocumentDidOpenNew
: This will be called when a mojo.eventsnewFontDidOpen
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- font
-
fontDocumentWillOpenBinaryFont
: This will be called when a mojo.eventsbinaryFontWillOpen
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- font
- format
- source
-
fontDocumentWillOpen
: This will be called when a mojo.eventsfontWillOpen
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- font
-
fontDocumentDidOpen
: This will be called when a mojo.eventsfontDidOpen
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- font
-
fontDocumentWillSave
: This will be called when a mojo.eventsfontWillSave
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- font
- path
-
fontDocumentDidSave
: This will be called when a mojo.eventsfontDidSave
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- font
- path
-
fontDocumentWillAutoSave
: This will be called when a mojo.eventsfontWillAutoSave
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- font
-
fontDocumentDidAutoSave
: This will be called when a mojo.eventsfontDidAutoSave
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- font
-
fontDocumentWillGenerate
: This will be called when a mojo.eventsfontWillGenerate
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- font
- testInstall
- format
- path
- layerName
-
fontDocumentDidGenerate
: This will be called when a mojo.eventsfontDidGenerate
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- font
- format
- path
- layerName
-
fontDocumentWillTestInstall
: This will be called when a mojo.eventsfontWillTestInstall
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- font
- success
- format
- report
-
fontDocumentDidTestInstall
: This will be called when a mojo.eventsfontDidTestInstall
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- font
- format
-
fontDocumentWillTestDeinstall
: This will be called when a mojo.eventsfontWillTestDeinstall
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- font
-
fontDocumentDidTestDeinstall
: This will be called when a mojo.eventsfontDidTestDeinstall
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- font
-
fontDocumentDidChangeExternally
: This will be called when a mojo.eventsfontDidChangeExternally
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- font
-
fontDocumentDidBecomeCurrent
: This will be called when a mojo.eventsfontBecameCurrent
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- font
-
fontDocumentDidResignCurrent
: This will be called when a mojo.eventsfontResignCurrent
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- font
-
fontDocumentWillClose
: This will be called when a mojo.eventsfontWillClose
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- font
-
fontDocumentDidClose
: This will be called when a mojo.eventsfontDidClose
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- font
-
fontDocumentWindowDidOpen
: This will be called when a mojo.eventsfontWindowDidOpen
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- font
-
fontDocumentWindowWillOpen
: This will be called when a mojo.eventsfontWindowWillOpen
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- font
-
fontDocumentWantsToolbarItems
: This will be called when a mojo.eventsfontWindowWillShowToolbarItems
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- font
- singleWindowMode
- itemDescriptions
-
fontOverviewWillOpen
: This will be called when a mojo.eventsfontOverviewWillOpen
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- fontOverview
- font
-
fontOverviewDidOpen
: This will be called when a mojo.eventsfontOverviewDidOpen
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- fontOverview
- font
-
fontOverviewWillClose
: This will be called when a mojo.eventsfontOverviewWillClose
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- fontOverview
- font
-
fontOverviewDidCopy
: This will be called when a mojo.eventsfontOverviewCopy
event is posted. Default delay: 0.000 seconds. -
fontOverviewDidRedo
: This will be called when a mojo.eventsfontOverViewRedo
event is posted. Default delay: 0.000 seconds. -
fontOverviewDidUndo
: This will be called when a mojo.eventsfontOverViewUndo
event is posted. Default delay: 0.000 seconds. -
fontOverviewDidPaste
: This will be called when a mojo.eventsfontOverviewPaste
event is posted. Default delay: 0.000 seconds. -
fontOverviewWantsContextualMenuItems
: This will be called when a mojo.eventsfontOverviewAdditionContextualMenuItems
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.eventsglyphWindowWillOpen
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- glyph
- glyphEditor
-
glyphEditorDidOpen
: This will be called when a mojo.eventsglyphWindowDidOpen
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- glyph
- glyphEditor
-
glyphEditorWillClose
: This will be called when a mojo.eventsglyphWindowWillClose
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- glyph
- glyphEditor
-
glyphEditorWillSetGlyph
: This will be called when a mojo.eventsviewWillChangeGlyph
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- glyph
- glyphEditor
-
glyphEditorDidSetGlyph
: This will be called when a mojo.eventsviewDidChangeGlyph
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- glyph
- glyphEditor
-
glyphEditorDidKeyDown
: This will be called when a mojo.eventskeyDown
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- glyph
- glyphEditor
- locationInGlyph
- deviceState
- NSEvent
-
glyphEditorDidKeyUp
: This will be called when a mojo.eventskeyUp
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- glyph
- glyphEditor
- locationInGlyph
- deviceState
- NSEvent
-
glyphEditorDidChangeModifiers
: This will be called when a mojo.eventsmodifiersChanged
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- glyph
- glyphEditor
- locationInGlyph
- deviceState
- NSEvent
-
glyphEditorDidMouseDown
: This will be called when a mojo.eventsmouseDown
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- glyph
- glyphEditor
- locationInGlyph
- deviceState
- NSEvent
-
glyphEditorDidMouseUp
: This will be called when a mojo.eventsmouseUp
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.eventsmouseMoved
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.eventsmouseDragged
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.eventsrightMouseDown
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- glyph
- glyphEditor
- locationInGlyph
- deviceState
- NSEvent
-
glyphEditorDidRightMouseDrag
: This will be called when a mojo.eventsrightMouseDragged
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.eventsrightMouseUp
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.eventsviewDidChangeScale
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- glyph
- glyphEditor
- scale
-
glyphEditorWillScale
: This will be called when a mojo.eventsviewWillChangeScale
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- glyph
- glyphEditor
- scale
-
glyphEditorDidCopy
: This will be called when a mojo.eventscopy
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- glyph
- glyphEditor
- locationInGlyph
- deviceState
- NSEvent
-
glyphEditorDidCopyAsComponent
: This will be called when a mojo.eventscopyAsComponent
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- glyph
- glyphEditor
- locationInGlyph
- deviceState
- NSEvent
-
glyphEditorDidCut
: This will be called when a mojo.eventscut
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- glyph
- glyphEditor
- locationInGlyph
- deviceState
- NSEvent
-
glyphEditorDidPaste
: This will be called when a mojo.eventspaste
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- glyph
- glyphEditor
- locationInGlyph
- deviceState
- NSEvent
-
glyphEditorDidPasteSpecial
: This will be called when a mojo.eventspasteSpecial
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- glyph
- glyphEditor
- locationInGlyph
- deviceState
- NSEvent
-
glyphEditorDidDelete
: This will be called when a mojo.eventsdelete
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- glyph
- glyphEditor
- locationInGlyph
- deviceState
- NSEvent
-
glyphEditorDidSelectAll
: This will be called when a mojo.eventsselectAll
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- glyph
- glyphEditor
- locationInGlyph
- deviceState
- NSEvent
-
glyphEditorDidSelectAllAlternate
: This will be called when a mojo.eventsselectAllAlternate
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- glyph
- glyphEditor
- locationInGlyph
- deviceState
- NSEvent
-
glyphEditorDidSelectAllControl
: This will be called when a mojo.eventsselectAllControl
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- glyph
- glyphEditor
- locationInGlyph
- deviceState
- NSEvent
-
glyphEditorDidDeselectAll
: This will be called when a mojo.eventsdeselectAll
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- glyph
- glyphEditor
- locationInGlyph
- deviceState
- NSEvent
-
glyphEditorDidAddUndoItem
: This will be called when a mojo.eventsaddedUndoItem
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- glyph
- glyphEditor
- locationInGlyph
- deviceState
- NSEvent
-
glyphEditorDidUndo
: This will be called when a mojo.eventsdidUndo
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- glyph
- glyphEditor
- locationInGlyph
- deviceState
- NSEvent
-
glyphEditorWantsContextualMenuItems
: This will be called when a mojo.eventsglyphAdditionContextualMenuItems
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.eventspointAdditionContextualMenuItems
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.eventsanchorAdditionContextualMenuItems
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.eventsguideAdditionContextualMenuItems
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.eventsimageAdditionContextualMenuItems
event is posted. Default delay: 0.000 seconds.Info Dictionary contains:
- glyph
- glyphEditor
- locationInGlyph
- deviceState
- NSEvent
- itemDescriptions
-
glyphEditorWantsToolbarItems
: Available when registered as a RoboFont subscriber:registerRoboFontSubscriber
.Info Dictionary contains:
- itemDescriptions
-
spaceCenterWillOpen
: This will be called when a mojo.eventsspaceCenterWillOpen
event is posted. Default delay: 0.000 seconds. -
spaceCenterDidOpen
: This will be called when a mojo.eventsspaceCenterDidOpen
event is posted. Default delay: 0.000 seconds. -
spaceCenterWillClose
: This will be called when a mojo.eventsspaceCenterWillClose
event is posted. Default delay: 0.000 seconds. -
spaceCenterDidKeyDown
: This will be called when a mojo.eventsspaceCenterKeyDown
event is posted. Default delay: 0.000 seconds. -
spaceCenterDidKeyUp
: This will be called when a mojo.eventsspaceCenterKeyUp
event is posted. Default delay: 0.000 seconds. -
spaceCenterDidChangeSelection
: This will be called when a mojo.eventsspaceCenterSelectionChanged
event is posted. Default delay: 0.000 seconds. -
spaceCenterDidChangeText
: This will be called when a mojo.eventsspaceCenterInputChanged
event is posted. Default delay: 0.000 seconds. -
spaceCenterWantsContextualMenuItems
: This will be called when a mojo.eventsspaceCenterAdditionContextualMenuItems
event is posted. Default delay: 0.000 seconds.
The built-in object event methods are:
-
fontDidChange
: This will be called when any ofFont.Changed
are posted. Default delay: 0.033 seconds. -
fontDidReloadGlyphs
: This will be called when any ofFont.ReloadedGlyphs
are posted. Default delay: 0.033 seconds. -
fontDidChangeGlyphOrder
: This will be called when any ofFont.GlyphOrderChanged
are posted. Default delay: 0.033 seconds. -
fontDidChangeGuidelines
: This will be called when any ofFont.GuidelinesChanged
are posted. Default delay: 0.033 seconds. -
fontInfoDidChange
: This will be called when any ofInfo.Changed
are posted. Default delay: 0.033 seconds. -
fontInfoDidChangeValue
: This will be called when any ofInfo.ValueChanged
are posted. Default delay: 0.033 seconds. -
fontKerningDidChange
: This will be called when any ofKerning.Changed
are posted. Default delay: 0.033 seconds. -
fontKerningDidChangePair
: This will be called when any ofKerning.PairSet
,Kerning.PairDeleted
are posted. Default delay: 0.033 seconds. -
fontKerningDidClear
: This will be called when any ofKerning.Cleared
are posted. Default delay: 0.033 seconds. -
fontKerningDidUpdate
: This will be called when any ofKerning.Updated
are posted. Default delay: 0.033 seconds. -
fontGroupsDidChange
: This will be called when any ofGroups.Changed
are posted. Default delay: 0.033 seconds. -
fontGroupsDidChangeGroup
: This will be called when any ofGroups.GroupSet
,Groups.GroupDeleted
are posted. Default delay: 0.033 seconds. -
fontGroupsDidClear
: This will be called when any ofGroups.Cleared
are posted. Default delay: 0.033 seconds. -
fontGroupsDidUpdate
: This will be called when any ofGroups.Updated
are posted. Default delay: 0.033 seconds. -
fontFeaturesDidChange
: This will be called when any ofFeatures.Changed
are posted. Default delay: 0.033 seconds. -
fontFeaturesDidChangeText
: This will be called when any ofFeatures.TextChanged
are posted. Default delay: 0.033 seconds. -
fontLayersDidChange
: This will be called when any ofLayerSet.LayersChanged
are posted. Default delay: 0.033 seconds. -
fontLayersDidChangeLayer
: This will be called when any ofLayerSet.LayerChanged
are posted. Default delay: 0.033 seconds. -
fontLayersDidSetDefaultLayer
: This will be called when any ofLayerSet.DefaultLayerChanged
are posted. Default delay: 0.033 seconds. -
fontLayersDidChangeOrder
: This will be called when any ofLayerSet.LayerOrderChanged
are posted. Default delay: 0.033 seconds. -
fontLayersDidAddLayer
: This will be called when any ofLayerSet.LayerAdded
are posted. Default delay: 0.033 seconds. -
fontLayersDidRemoveLayer
: This will be called when any ofLayerSet.LayerDeleted
are posted. Default delay: 0.033 seconds. -
fontLayersDidChangeLayerName
: This will be called when any ofLayerSet.LayerNameChanged
are posted. Default delay: 0.033 seconds. -
layerDidChange
: This will be called when any ofLayer.Changed
are posted. Default delay: 0.033 seconds. -
layerDidChangeGlyphs
: This will be called when any ofLayer.GlyphsChanged
are posted. Default delay: 0.033 seconds. -
layerDidChangeGlyph
: This will be called when any ofLayer.GlyphChanged
are posted. Default delay: 0.033 seconds. -
layerDidAddGlyph
: This will be called when any ofLayer.GlyphAdded
are posted. Default delay: 0.033 seconds. -
layerDidRemoveGlyph
: This will be called when any ofLayer.GlyphDeleted
are posted. Default delay: 0.033 seconds. -
layerDidChangeGlyphName
: This will be called when any ofLayer.GlyphNameChanged
are posted. Default delay: 0.033 seconds. -
layerDidChangeGlyphUnicodes
: This will be called when any ofLayer.GlyphUnicodesChanged
are posted. Default delay: 0.033 seconds. -
layerDidChangeName
: This will be called when any ofLayer.NameChanged
are posted. Default delay: 0.033 seconds. -
layerDidChangeColor
: This will be called when any ofLayer.ColorChanged
are posted. Default delay: 0.033 seconds. -
glyphDidChange
: This will be called when any ofGlyph.Changed
are posted. Default delay: 0.033 seconds. -
glyphDidChangeInfo
: This will be called when any ofGlyph.NameChanged
,Glyph.UnicodesChanged
,Glyph.NoteChanged
,Glyph.MarkColorChanged
are posted. Default delay: 0.033 seconds. -
glyphDidChangeMetrics
: This will be called when any ofGlyph.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 ofGlyph.ContoursChanged
,Glyph.ComponentsChanged
are posted. Default delay: 0.033 seconds. -
glyphDidChangeContours
: This will be called when any ofGlyph.ContoursChanged
are posted. Default delay: 0.033 seconds. -
glyphDidChangeComponents
: This will be called when any ofGlyph.ComponentsChanged
are posted. Default delay: 0.033 seconds. -
glyphDidChangeAnchors
: This will be called when any ofGlyph.AnchorsChanged
are posted. Default delay: 0.033 seconds. -
glyphDidChangeGuidelines
: This will be called when any ofGlyph.GuidelinesChanged
are posted. Default delay: 0.033 seconds. -
glyphDidChangeImage
: This will be called when any ofGlyph.ImageChanged
are posted. Default delay: 0.033 seconds. -
glyphDidChangeSelection
: This will be called when any ofGlyph.SelectionChanged
are posted. Default delay: 0.033 seconds. -
glyphDidStartChangeSelection
: This will be called when any ofGlyph.SelectionStarted
are posted. Default delay: 0.000 seconds. -
glyphDidEndChangeSelection
: This will be called when any ofGlyph.SelectionEnded
are posted. Default delay: 0.000 seconds. -
glyphDidChangeMeasurements
: This will be called when any ofGlyph.MeasurementAdded
,Glyph.MeasurementsCleared
,Glyph.MeasurementChanged
are posted. Default delay: 0.033 seconds. -
glyphEditorFontDidChange
: This does the same thing asfontDidChange
but is only called for the glyph in the glyph editor. -
glyphEditorFontDidReloadGlyphs
: This does the same thing asfontDidReloadGlyphs
but is only called for the glyph in the glyph editor. -
glyphEditorFontDidChangeGlyphOrder
: This does the same thing asfontDidChangeGlyphOrder
but is only called for the glyph in the glyph editor. -
glyphEditorFontDidChangeGuidelines
: This does the same thing asfontDidChangeGuidelines
but is only called for the glyph in the glyph editor. -
glyphEditorFontInfoDidChange
: This does the same thing asfontInfoDidChange
but is only called for the glyph in the glyph editor. -
glyphEditorFontInfoDidChangeValue
: This does the same thing asfontInfoDidChangeValue
but is only called for the glyph in the glyph editor. -
glyphEditorFontKerningDidChange
: This does the same thing asfontKerningDidChange
but is only called for the glyph in the glyph editor. -
glyphEditorFontKerningDidChangePair
: This does the same thing asfontKerningDidChangePair
but is only called for the glyph in the glyph editor. -
glyphEditorFontKerningDidClear
: This does the same thing asfontKerningDidClear
but is only called for the glyph in the glyph editor. -
glyphEditorFontKerningDidUpdate
: This does the same thing asfontKerningDidUpdate
but is only called for the glyph in the glyph editor. -
glyphEditorFontGroupsDidChange
: This does the same thing asfontGroupsDidChange
but is only called for the glyph in the glyph editor. -
glyphEditorFontGroupsDidChangeGroup
: This does the same thing asfontGroupsDidChangeGroup
but is only called for the glyph in the glyph editor. -
glyphEditorFontGroupsDidClear
: This does the same thing asfontGroupsDidClear
but is only called for the glyph in the glyph editor. -
glyphEditorFontGroupsDidUpdate
: This does the same thing asfontGroupsDidUpdate
but is only called for the glyph in the glyph editor. -
glyphEditorFontFeaturesDidChange
: This does the same thing asfontFeaturesDidChange
but is only called for the glyph in the glyph editor. -
glyphEditorFontFeaturesDidChangeText
: This does the same thing asfontFeaturesDidChangeText
but is only called for the glyph in the glyph editor. -
glyphEditorFontLayersDidChange
: This does the same thing asfontLayersDidChange
but is only called for the glyph in the glyph editor. -
glyphEditorFontLayersDidChangeLayer
: This does the same thing asfontLayersDidChangeLayer
but is only called for the glyph in the glyph editor. -
glyphEditorFontLayersDidSetDefaultLayer
: This does the same thing asfontLayersDidSetDefaultLayer
but is only called for the glyph in the glyph editor. -
glyphEditorFontLayersDidChangeOrder
: This does the same thing asfontLayersDidChangeOrder
but is only called for the glyph in the glyph editor. -
glyphEditorFontLayersDidAddLayer
: This does the same thing asfontLayersDidAddLayer
but is only called for the glyph in the glyph editor. -
glyphEditorFontLayersDidRemoveLayer
: This does the same thing asfontLayersDidRemoveLayer
but is only called for the glyph in the glyph editor. -
glyphEditorFontLayersDidChangeLayerName
: This does the same thing asfontLayersDidChangeLayerName
but is only called for the glyph in the glyph editor. -
glyphEditorLayerDidChange
: This does the same thing aslayerDidChange
but is only called for the glyph in the glyph editor. -
glyphEditorLayerDidChangeGlyphs
: This does the same thing aslayerDidChangeGlyphs
but is only called for the glyph in the glyph editor. -
glyphEditorLayerDidChangeGlyph
: This does the same thing aslayerDidChangeGlyph
but is only called for the glyph in the glyph editor. -
glyphEditorLayerDidAddGlyph
: This does the same thing aslayerDidAddGlyph
but is only called for the glyph in the glyph editor. -
glyphEditorLayerDidRemoveGlyph
: This does the same thing aslayerDidRemoveGlyph
but is only called for the glyph in the glyph editor. -
glyphEditorLayerDidChangeGlyphName
: This does the same thing aslayerDidChangeGlyphName
but is only called for the glyph in the glyph editor. -
glyphEditorLayerDidChangeGlyphUnicodes
: This does the same thing aslayerDidChangeGlyphUnicodes
but is only called for the glyph in the glyph editor. -
glyphEditorLayerDidChangeName
: This does the same thing aslayerDidChangeName
but is only called for the glyph in the glyph editor. -
glyphEditorLayerDidChangeColor
: This does the same thing aslayerDidChangeColor
but is only called for the glyph in the glyph editor. -
glyphEditorGlyphDidChange
: This does the same thing asglyphDidChange
but is only called for the glyph in the glyph editor. -
glyphEditorGlyphDidChangeInfo
: This does the same thing asglyphDidChangeInfo
but is only called for the glyph in the glyph editor. -
glyphEditorGlyphDidChangeMetrics
: This does the same thing asglyphDidChangeMetrics
but is only called for the glyph in the glyph editor. -
glyphEditorGlyphDidChangeOutline
: This does the same thing asglyphDidChangeOutline
but is only called for the glyph in the glyph editor. -
glyphEditorGlyphDidChangeContours
: This does the same thing asglyphDidChangeContours
but is only called for the glyph in the glyph editor. -
glyphEditorGlyphDidChangeComponents
: This does the same thing asglyphDidChangeComponents
but is only called for the glyph in the glyph editor. -
glyphEditorGlyphDidChangeAnchors
: This does the same thing asglyphDidChangeAnchors
but is only called for the glyph in the glyph editor. -
glyphEditorGlyphDidChangeGuidelines
: This does the same thing asglyphDidChangeGuidelines
but is only called for the glyph in the glyph editor. -
glyphEditorGlyphDidChangeImage
: This does the same thing asglyphDidChangeImage
but is only called for the glyph in the glyph editor. -
glyphEditorGlyphDidChangeSelection
: This does the same thing asglyphDidChangeSelection
but is only called for the glyph in the glyph editor. -
glyphEditorGlyphDidStartChangeSelection
: This does the same thing asglyphDidStartChangeSelection
but is only called for the glyph in the glyph editor. -
glyphEditorGlyphDidEndChangeSelection
: This does the same thing asglyphDidEndChangeSelection
but is only called for the glyph in the glyph editor. -
glyphEditorGlyphDidChangeMeasurements
: This does the same thing asglyphDidChangeMeasurements
but is only called for the glyph in the glyph editor. -
currentFontDidChange
: This does the same thing asfontDidChange
but is only called for the current font. -
currentFontDidReloadGlyphs
: This does the same thing asfontDidReloadGlyphs
but is only called for the current font. -
currentFontDidChangeGlyphOrder
: This does the same thing asfontDidChangeGlyphOrder
but is only called for the current font. -
currentFontDidChangeGuidelines
: This does the same thing asfontDidChangeGuidelines
but is only called for the current font. -
currentFontInfoDidChange
: This does the same thing asfontInfoDidChange
but is only called for the current font. -
currentFontInfoDidChangeValue
: This does the same thing asfontInfoDidChangeValue
but is only called for the current font. -
currentFontKerningDidChange
: This does the same thing asfontKerningDidChange
but is only called for the current font. -
currentFontKerningDidChangePair
: This does the same thing asfontKerningDidChangePair
but is only called for the current font. -
currentFontKerningDidClear
: This does the same thing asfontKerningDidClear
but is only called for the current font. -
currentFontKerningDidUpdate
: This does the same thing asfontKerningDidUpdate
but is only called for the current font. -
currentFontGroupsDidChange
: This does the same thing asfontGroupsDidChange
but is only called for the current font. -
currentFontGroupsDidChangeGroup
: This does the same thing asfontGroupsDidChangeGroup
but is only called for the current font. -
currentFontGroupsDidClear
: This does the same thing asfontGroupsDidClear
but is only called for the current font. -
currentFontGroupsDidUpdate
: This does the same thing asfontGroupsDidUpdate
but is only called for the current font. -
currentFontFeaturesDidChange
: This does the same thing asfontFeaturesDidChange
but is only called for the current font. -
currentFontFeaturesDidChangeText
: This does the same thing asfontFeaturesDidChangeText
but is only called for the current font. -
currentFontLayersDidChange
: This does the same thing asfontLayersDidChange
but is only called for the current font. -
currentFontLayersDidChangeLayer
: This does the same thing asfontLayersDidChangeLayer
but is only called for the current font. -
currentFontLayersDidSetDefaultLayer
: This does the same thing asfontLayersDidSetDefaultLayer
but is only called for the current font. -
currentFontLayersDidChangeOrder
: This does the same thing asfontLayersDidChangeOrder
but is only called for the current font. -
currentFontLayersDidAddLayer
: This does the same thing asfontLayersDidAddLayer
but is only called for the current font. -
currentFontLayersDidRemoveLayer
: This does the same thing asfontLayersDidRemoveLayer
but is only called for the current font. -
currentFontLayersDidChangeLayerName
: This does the same thing asfontLayersDidChangeLayerName
but is only called for the current font. -
currentFontLayerDidChange
: This does the same thing aslayerDidChange
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
: This does the same thing aslayerDidChangeGlyphs
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
: This does the same thing aslayerDidChangeGlyph
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
: This does the same thing aslayerDidAddGlyph
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
: This does the same thing aslayerDidRemoveGlyph
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
: This does the same thing aslayerDidChangeGlyphName
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
: This does the same thing aslayerDidChangeGlyphUnicodes
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
: This does the same thing aslayerDidChangeName
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
: This does the same thing aslayerDidChangeColor
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
: This does the same thing asglyphDidChange
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
: This does the same thing asglyphDidChangeInfo
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
: This does the same thing asglyphDidChangeMetrics
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
: This does the same thing asglyphDidChangeOutline
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
: This does the same thing asglyphDidChangeContours
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
: This does the same thing asglyphDidChangeComponents
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
: This does the same thing asglyphDidChangeAnchors
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
: This does the same thing asglyphDidChangeGuidelines
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
: This does the same thing asglyphDidChangeImage
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
: This does the same thing asglyphDidChangeSelection
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
: This does the same thing asglyphDidStartChangeSelection
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
: This does the same thing asglyphDidEndChangeSelection
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
: This does the same thing asglyphDidChangeMeasurements
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. -
currentGlyphFontDidChange
: This does the same thing asfontDidChange
but is only called for the current glyph. -
currentGlyphFontDidReloadGlyphs
: This does the same thing asfontDidReloadGlyphs
but is only called for the current glyph. -
currentGlyphFontDidChangeGlyphOrder
: This does the same thing asfontDidChangeGlyphOrder
but is only called for the current glyph. -
currentGlyphFontDidChangeGuidelines
: This does the same thing asfontDidChangeGuidelines
but is only called for the current glyph. -
currentGlyphFontInfoDidChange
: This does the same thing asfontInfoDidChange
but is only called for the current glyph. -
currentGlyphFontInfoDidChangeValue
: This does the same thing asfontInfoDidChangeValue
but is only called for the current glyph. -
currentGlyphFontKerningDidChange
: This does the same thing asfontKerningDidChange
but is only called for the current glyph. -
currentGlyphFontKerningDidChangePair
: This does the same thing asfontKerningDidChangePair
but is only called for the current glyph. -
currentGlyphFontKerningDidClear
: This does the same thing asfontKerningDidClear
but is only called for the current glyph. -
currentGlyphFontKerningDidUpdate
: This does the same thing asfontKerningDidUpdate
but is only called for the current glyph. -
currentGlyphFontGroupsDidChange
: This does the same thing asfontGroupsDidChange
but is only called for the current glyph. -
currentGlyphFontGroupsDidChangeGroup
: This does the same thing asfontGroupsDidChangeGroup
but is only called for the current glyph. -
currentGlyphFontGroupsDidClear
: This does the same thing asfontGroupsDidClear
but is only called for the current glyph. -
currentGlyphFontGroupsDidUpdate
: This does the same thing asfontGroupsDidUpdate
but is only called for the current glyph. -
currentGlyphFontFeaturesDidChange
: This does the same thing asfontFeaturesDidChange
but is only called for the current glyph. -
currentGlyphFontFeaturesDidChangeText
: This does the same thing asfontFeaturesDidChangeText
but is only called for the current glyph. -
currentGlyphFontLayersDidChange
: This does the same thing asfontLayersDidChange
but is only called for the current glyph. -
currentGlyphFontLayersDidChangeLayer
: This does the same thing asfontLayersDidChangeLayer
but is only called for the current glyph. -
currentGlyphFontLayersDidSetDefaultLayer
: This does the same thing asfontLayersDidSetDefaultLayer
but is only called for the current glyph. -
currentGlyphFontLayersDidChangeOrder
: This does the same thing asfontLayersDidChangeOrder
but is only called for the current glyph. -
currentGlyphFontLayersDidAddLayer
: This does the same thing asfontLayersDidAddLayer
but is only called for the current glyph. -
currentGlyphFontLayersDidRemoveLayer
: This does the same thing asfontLayersDidRemoveLayer
but is only called for the current glyph. -
currentGlyphFontLayersDidChangeLayerName
: This does the same thing asfontLayersDidChangeLayerName
but is only called for the current glyph. -
currentGlyphLayerDidChange
: This does the same thing aslayerDidChange
but is only called for the current glyph. -
currentGlyphLayerDidChangeGlyphs
: This does the same thing aslayerDidChangeGlyphs
but is only called for the current glyph. -
currentGlyphLayerDidChangeGlyph
: This does the same thing aslayerDidChangeGlyph
but is only called for the current glyph. -
currentGlyphLayerDidAddGlyph
: This does the same thing aslayerDidAddGlyph
but is only called for the current glyph. -
currentGlyphLayerDidRemoveGlyph
: This does the same thing aslayerDidRemoveGlyph
but is only called for the current glyph. -
currentGlyphLayerDidChangeGlyphName
: This does the same thing aslayerDidChangeGlyphName
but is only called for the current glyph. -
currentGlyphLayerDidChangeGlyphUnicodes
: This does the same thing aslayerDidChangeGlyphUnicodes
but is only called for the current glyph. -
currentGlyphLayerDidChangeName
: This does the same thing aslayerDidChangeName
but is only called for the current glyph. -
currentGlyphLayerDidChangeColor
: This does the same thing aslayerDidChangeColor
but is only called for the current glyph. -
currentGlyphDidChange
: This does the same thing asglyphDidChange
but is only called for the current glyph. -
currentGlyphDidChangeInfo
: This does the same thing asglyphDidChangeInfo
but is only called for the current glyph. -
currentGlyphDidChangeMetrics
: This does the same thing asglyphDidChangeMetrics
but is only called for the current glyph. -
currentGlyphDidChangeOutline
: This does the same thing asglyphDidChangeOutline
but is only called for the current glyph. -
currentGlyphDidChangeContours
: This does the same thing asglyphDidChangeContours
but is only called for the current glyph. -
currentGlyphDidChangeComponents
: This does the same thing asglyphDidChangeComponents
but is only called for the current glyph. -
currentGlyphDidChangeAnchors
: This does the same thing asglyphDidChangeAnchors
but is only called for the current glyph. -
currentGlyphDidChangeGuidelines
: This does the same thing asglyphDidChangeGuidelines
but is only called for the current glyph. -
currentGlyphDidChangeImage
: This does the same thing asglyphDidChangeImage
but is only called for the current glyph. -
currentGlyphDidChangeSelection
: This does the same thing asglyphDidChangeSelection
but is only called for the current glyph. -
currentGlyphDidStartChangeSelection
: This does the same thing asglyphDidStartChangeSelection
but is only called for the current glyph. -
currentGlyphDidEndChangeSelection
: This does the same thing asglyphDidEndChangeSelection
but is only called for the current glyph. -
currentGlyphDidChangeMeasurements
: This does the same thing asglyphDidChangeMeasurements
but is only called for the current glyph. -
adjunctFontDidChange
: This does the same thing asfontDidChange
but is only called for adjunct objects. -
adjunctFontDidReloadGlyphs
: This does the same thing asfontDidReloadGlyphs
but is only called for adjunct objects. -
adjunctFontDidChangeGlyphOrder
: This does the same thing asfontDidChangeGlyphOrder
but is only called for adjunct objects. -
adjunctFontDidChangeGuidelines
: This does the same thing asfontDidChangeGuidelines
but is only called for adjunct objects. -
adjunctFontInfoDidChange
: This does the same thing asfontInfoDidChange
but is only called for adjunct objects. -
adjunctFontInfoDidChangeValue
: This does the same thing asfontInfoDidChangeValue
but is only called for adjunct objects. -
adjunctFontKerningDidChange
: This does the same thing asfontKerningDidChange
but is only called for adjunct objects. -
adjunctFontKerningDidChangePair
: This does the same thing asfontKerningDidChangePair
but is only called for adjunct objects. -
adjunctFontKerningDidClear
: This does the same thing asfontKerningDidClear
but is only called for adjunct objects. -
adjunctFontKerningDidUpdate
: This does the same thing asfontKerningDidUpdate
but is only called for adjunct objects. -
adjunctFontGroupsDidChange
: This does the same thing asfontGroupsDidChange
but is only called for adjunct objects. -
adjunctFontGroupsDidChangeGroup
: This does the same thing asfontGroupsDidChangeGroup
but is only called for adjunct objects. -
adjunctFontGroupsDidClear
: This does the same thing asfontGroupsDidClear
but is only called for adjunct objects. -
adjunctFontGroupsDidUpdate
: This does the same thing asfontGroupsDidUpdate
but is only called for adjunct objects. -
adjunctFontFeaturesDidChange
: This does the same thing asfontFeaturesDidChange
but is only called for adjunct objects. -
adjunctFontFeaturesDidChangeText
: This does the same thing asfontFeaturesDidChangeText
but is only called for adjunct objects. -
adjunctFontLayersDidChange
: This does the same thing asfontLayersDidChange
but is only called for adjunct objects. -
adjunctFontLayersDidChangeLayer
: This does the same thing asfontLayersDidChangeLayer
but is only called for adjunct objects. -
adjunctFontLayersDidSetDefaultLayer
: This does the same thing asfontLayersDidSetDefaultLayer
but is only called for adjunct objects. -
adjunctFontLayersDidChangeOrder
: This does the same thing asfontLayersDidChangeOrder
but is only called for adjunct objects. -
adjunctFontLayersDidAddLayer
: This does the same thing asfontLayersDidAddLayer
but is only called for adjunct objects. -
adjunctFontLayersDidRemoveLayer
: This does the same thing asfontLayersDidRemoveLayer
but is only called for adjunct objects. -
adjunctFontLayersDidChangeLayerName
: This does the same thing asfontLayersDidChangeLayerName
but is only called for adjunct objects. -
adjunctLayerDidChange
: This does the same thing aslayerDidChange
but is only called for adjunct objects. -
adjunctLayerDidChangeGlyphs
: This does the same thing aslayerDidChangeGlyphs
but is only called for adjunct objects. -
adjunctLayerDidChangeGlyph
: This does the same thing aslayerDidChangeGlyph
but is only called for adjunct objects. -
adjunctLayerDidAddGlyph
: This does the same thing aslayerDidAddGlyph
but is only called for adjunct objects. -
adjunctLayerDidRemoveGlyph
: This does the same thing aslayerDidRemoveGlyph
but is only called for adjunct objects. -
adjunctLayerDidChangeGlyphName
: This does the same thing aslayerDidChangeGlyphName
but is only called for adjunct objects. -
adjunctLayerDidChangeGlyphUnicodes
: This does the same thing aslayerDidChangeGlyphUnicodes
but is only called for adjunct objects. -
adjunctLayerDidChangeName
: This does the same thing aslayerDidChangeName
but is only called for adjunct objects. -
adjunctLayerDidChangeColor
: This does the same thing aslayerDidChangeColor
but is only called for adjunct objects. -
adjunctGlyphDidChange
: This does the same thing asglyphDidChange
but is only called for adjunct objects. -
adjunctGlyphDidChangeInfo
: This does the same thing asglyphDidChangeInfo
but is only called for adjunct objects. -
adjunctGlyphDidChangeMetrics
: This does the same thing asglyphDidChangeMetrics
but is only called for adjunct objects. -
adjunctGlyphDidChangeOutline
: This does the same thing asglyphDidChangeOutline
but is only called for adjunct objects. -
adjunctGlyphDidChangeContours
: This does the same thing asglyphDidChangeContours
but is only called for adjunct objects. -
adjunctGlyphDidChangeComponents
: This does the same thing asglyphDidChangeComponents
but is only called for adjunct objects. -
adjunctGlyphDidChangeAnchors
: This does the same thing asglyphDidChangeAnchors
but is only called for adjunct objects. -
adjunctGlyphDidChangeGuidelines
: This does the same thing asglyphDidChangeGuidelines
but is only called for adjunct objects. -
adjunctGlyphDidChangeImage
: This does the same thing asglyphDidChangeImage
but is only called for adjunct objects. -
adjunctGlyphDidChangeSelection
: This does the same thing asglyphDidChangeSelection
but is only called for adjunct objects. -
adjunctGlyphDidStartChangeSelection
: This does the same thing asglyphDidStartChangeSelection
but is only called for adjunct objects. -
adjunctGlyphDidEndChangeSelection
: This does the same thing asglyphDidEndChangeSelection
but is only called for adjunct objects. -
adjunctGlyphDidChangeMeasurements
: This does the same thing asglyphDidChangeMeasurements
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 thelowLevelEvents
. 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.
addDefconSubscription(subscriberEventName, dispatcher, methodName, eventEligibilityFunction, eventInfoExtractionFunction, lowLevelEventNames, observeAllInstances, delay=0.03333333333333333)
addRoboFontSubscription(subscriberEventName, methodName, lowLevelEventNames, eventEligibilityFunction, eventInfoExtractionFunction, delay=0)
build()
Subclasses implement this method to do any construction necessary before the subscriptions are started.
getIdentifierPattern()
Get a fnmatch compatible identifier pattern that can be used to kill any existing instances of this class during debugging.