Mojo.robofont vs. robofab.world
-
It seems many of the functions in
mojo.robofont
are duplicates of functions inrobofab.world
.Are they really duplicates? ie. - does the mojo.robofont function actually just call the equivalent in robofab?
And if so, what is the guideline for when to prefer one module over the other?
-
Yes there will only work in RoboFont, but some have some similarities with the special FL robofab methods.
It doesnt matter if you imported it from
mojo.roboFont
orrobofab.world
(inside RoboFont) all robofab object will have these additions.
-
And just to be clear about the "Robofab extras":
http://doc.robofont.com/api/robofab-extras/
-
These are exclusive to the Robofont environment.
-
They are not part of any Robofont-native module, for instance
mojo.robofont
. -
They are only available by importing robofab.
-
But though they are robofab-based, they will not work in environments other than Robofont.
-
-
they are the same
see http://code.robofab.com/browser/trunk/Lib/robofab/world.py#L97the guideline would be:
- use
robofab.world
if you want to have your script interchangeable with NoneLab, FL and others. - use no import: all
mojo.roboFont
functionality are added to the scriptlocals()
(works only when you run the script in the scripting window) - use
mojo.roboFont
if you use your script as a module only in RoboFont
- use