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.
readSmartSets(path, useAsDefault=False, font=None)
Read a roboFontSets file and optionally store as defaults with useAsDefault
.
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.
class SmartSetsEditor()
A Smart Set contexts manager. To be used with a with statement.
A SmartSetsEditor
will automatically set the changed smart sets
and update all the Smart Set in the UI of all Open Font Windows.
with SmartSetsEditor() as smartSets:
for smartSet in smartSet:
if smartSet.selected():
smartSet # do something
- font
- Optionally provide a font to store the smart set in the font.
Inherits from subclass: mojo.smartSet.SmartSetsEditor