New to Typophile? Accounts are free, and easy to set up.
Using python in Fontlab, I understand how to save a currently open VFB, or save a currently open VFB under a different name.
What I don't understand is how to get the "save as" behavior: keep the current VFB & its windows open, but give it a new filename.
16 Jul 2011 — 8:31am
fl.font.file_name = "your new path"fl.font.Save()
or
fl.font.Save("your new path")A.
16 Jul 2011 — 9:25am
Yep, I already tried that. What happens is that FL saves a duplicate of my open font at "your new path." But the filename on the open font doesn't change (and thus if I hit "save" again, any changes go into the old file.)
17 Jul 2011 — 4:55am
How about:
fl.font.file_name = "your new path"fl.UpdateFont(-1)
fl.font.Save(fl.font.file_name)
?
17 Jul 2011 — 2:01pm
That works. Thanks.
Does a fontindex of -1 have a predictable result in other functions that ask for a fontindex, or is this a special behavior of UpdateFont()?
17 Jul 2011 — 3:36pm
Can also be done through Robofab
new_file_path = [whatever you want]
this_font.save(new_file_path)
this_font.update()
3 Aug 2011 — 9:17am
fl.UpdateFont(-1) is synonymous with fl.UpdateFont(fl.ifont) in this case, but it's not universal behavior, I think. Actually, using fl.UpdateFont(fl.ifont) is more elegant to use than fl.UpdateFont(-1).