mojo.smartSet

addSmartSet(smartSet, index=None, font=None)

Add a Smart Set object.

index
Optionally insert the given Smart Set at an index.
font
Optionally provide a font to store the smart set in the font.

getDefault(key, defaultValue=None, defaultClass=None)

Get a default Preferences value for a key, with a fallback value if the key is not present in the defaults.

getSmartSets(font=None)

Return a list of all current Smart Sets.

font
Optionally provide a font get the smartsets from the font.

removeSmartSet(smartSetName, font=None)

Remove a Smart Set by name.

font
Optionally provide a font to remove the smart set in the font.

selectSmartSets(selection, currentDocumentOnly=True)

Select Smart Sets according to a given list of indexes.

currentDocumentOnly
Optionally apply the selection to all open documents.

setDefault(key, value, validate=False)

Set a default Preferences value for a key.

Optionally validate the key and the value.

setSmartSets(smartSets, font=None)

Set a list of Smart Sets.

font
Optionally provide a font to store the smart set in the font.

updateAllSmartSets(selection=None)

Update the Smart Set list in the UI of all open Font Windows.

class RoboFontError()

Common base class for all non-exit exceptions.

class SmartSet()

A Smart Set object.

Inherits from subclass: mojo.smartSet.SmartSet

glyphNames

A list of glyph names.

groups

Return a list of all smart sets inside a group item.

query

Search query of the smart set.

addGroupSmartSet(smartSet)

Add a provided smartSet to a Smart Set group item.

getQueryObject()

Return the query as a NSPredicate object.

getQueryResult(font)

Return a list of glyph names after applying a query for a given font.

isGroup()

Return a bool indicating if the Smart Set is a group item.

removeGroupSmartSet(smartSet)

Remove the provided smartSet from a Smart Set group item.

removeGroups()

Remove all groups in the group item.

Last edited on 16/06/2020