There is your font, in memory. You can now write more code to do things to it. Because the font has no interface, there is no visual feedback to show the result of your actions. Don’t forget to save the font after you’re done.

In RoboFont 1.8, use showUI instead of showInterface:

f=OpenFont(u"/Users/me/Desktop/myfont.ufo",showUI=False)

NewFont

There will be cases in which you will need to create a new font from scratch, instead of using an existing one. In these cases, use NewFont:

f=NewFont()print(f)

>>> <Font None None>

If you don’t need a font window for it, use the showInterface=False argument like we did with OpenFont above:

f=NewFont(showInterface=False)

AllFonts

In some cases there will be not just one, but several fonts open at once in RoboFont. And we might want to do something to all these fonts at tonce. This is a job for AllFonts:

In the above example we have fonts from different families, and with different styles. What if we want to do something only to some of these fonts? Well, AllFonts offers some handy functions to help with that:

forfinAllFonts().getFontsByFamilyName('MyFont'):print(f)# do something

>>> <Font MyFont Bold>
>>> <Font MyFont Regular>

forfinAllFonts().getFontsByStyleName('Regular'):print(f)# do something