mojo.robofont vs. robofab.world

RoboFont Forums Help / General mojo.robofont vs. robofab.world

This topic contains 3 replies, has 2 voices, and was last updated by  frederik 8 years, 9 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3646

    butterick
    Participant

    It seems many of the functions in mojo.robofont are duplicates of functions in robofab.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?

    #3648

    frederik
    Keymaster

    they are the same
    see http://code.robofab.com/browser/trunk/Lib/robofab/world.py#L97

    the 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 script locals() (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

    #3651

    butterick
    Participant

    And just to be clear about the “Robofab extras”:

    http://doc.robofont.com/api/robofab-extras/

    1) These are exclusive to the Robofont environment.

    2) They are not part of any Robofont-native module, for instance mojo.robofont.

    3) They are only available by importing robofab.

    4) But though they are robofab-based, they will not work in environments other than Robofont.

    #3653

    frederik
    Keymaster

    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 or robofab.world (inside RoboFont) all robofab object will have these additions.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.