RoboFab and FontLab 5.1

556 views
Skip to first unread message

Mark Simonson

unread,
Sep 28, 2011, 7:13:09 PM9/28/11
to rob...@googlegroups.com
Is it possible to use RoboFab with FontLab 5.1?

Mark Simonson

-----------------------------------------
http://www.ms-studio.com
http://www.marksimonson.com

Tal Leming

unread,
Sep 28, 2011, 7:45:40 PM9/28/11
to rob...@googlegroups.com

On Sep 28, 2011, at 7:13 PM, Mark Simonson wrote:

> Is it possible to use RoboFab with FontLab 5.1?

Yes, with a caveat. The dialogs provided with robofab.interface.all.dialogs are misbehaving/not working in Mac OS 10.7. We're actively trying to resolve that but making a single API for all of the various OS, OS version and application combinations is frustrating. Other than that it works as far as we know.

You'll need to install RoboFab from source. To do this you need to figure out which Python FontLab is using. I'd tell you which it is, but it changes frequently and I'm not 100% sure where things stand at the moment. To figure out the Python version, run this in the macro panel:

import sys
print sys.version

Once you have this report, you can figure out which Terminal command you need. If you see 2.5, your command will be python2.5. If you see 2.6 and you are running OS 10.6, your command will be python. If you see 2.6 and you are running OS 10.7, your command will probably be python2.6 (I'm not running OS 10.7, so I'm guessing here). If you see 2.7, you are almost certainly running OS 10.7 (otherwise you really messed up your system) and your command will be python.

Now follow these steps, replacing yourpythoncommand with your Python command as defined above.

1. If you don't have it already, get the "RoboFab + FontTools + DialogKit Combo" zip here:http://robofab.com/download/index.html
2. Unpack the zip and put it in a location where you want the files to live. For example /Applications/RoboFab.
3. Open Terminal.
4. Type "cd " (the space is required) and drag the FontTools folder to the Terminal window. This should give you something like "cd /Applications/RoboFab/FontTools". Hit return.
5. Type "sudo yourpythoncommand setup.py install". Hit return.
6. A bunch of installation notes should appear.
7. Type "sudo yourpythoncommand " (the space is required) and drag the install.py file in the RoboFab directory to the Terminal window. Hit return.
8. "Robofab is now installed." should appear along with some other text.
9. Type "sudo yourpythoncommand " (the space is required) and drag the install.py file in the DialogKit directory to the Terminal window. Hit return.
10. "dialogKit is now installed." should appear along with some other text.
11. Restart FontLab if you have it open.

Hopefully this will work. We'll likely try to make this easier when the dust settles.

Tal

Mark Simonson

unread,
Sep 28, 2011, 8:22:01 PM9/28/11
to rob...@googlegroups.com
On Sep 28, 2011, at 6:45 PM, Tal Leming wrote:

Hopefully this will work. We'll likely try to make this easier when the dust settles.

It did--thanks, Tal! (I'm still on 10.6, FWIW.)

Mark

Mark Simonson

unread,
Sep 28, 2011, 8:35:05 PM9/28/11
to rob...@googlegroups.com
On Sep 28, 2011, at 6:45 PM, Tal Leming wrote:

>> Is it possible to use RoboFab with FontLab 5.1?
>

> Yes, with a caveat....

Would you mind if I posted these instructions on Typophile? The question came up, which is why I asked here in the first place.

Mark

Tal Leming

unread,
Sep 28, 2011, 8:37:28 PM9/28/11
to rob...@googlegroups.com

On Sep 28, 2011, at 8:35 PM, Mark Simonson wrote:

> Would you mind if I posted these instructions on Typophile? The question came up, which is why I asked here in the first place.

That's fine. Or you can point them to the group archive.

Tal

Erik van Blokland

unread,
Sep 29, 2011, 1:11:05 AM9/29/11
to rob...@googlegroups.com
Hey,
I've spent a couple of days on a robofab dialogs replacement.

Vanilla based dialogs works well in RoboFont and Glyphs. Fontlab 5.01 can use dialogKit. FontLab 5.1 on 10.6 has odd, hard to trace problems with vanilla. Sometimes it works, often they don't. I am leaning towards using dialogKit for 5.1 as well, though that raises other issues.
I have made some changes to my OSX installation that makes it easier to test in both 10,8 and 10.7.

I will keep you posted, I'm sorry it's taking so long.

Erik

> --
> You received this message because you are subscribed to the Google Groups "RoboFab" group.
> To post to this group, send email to rob...@googlegroups.com
> To unsubscribe from this group, send email to robofab-u...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/robofab?hl=en
>
> Messages from newly joined members are subject to moderation.
> Download RoboFab and documentation at http://robofab.com

Dezcom

unread,
Sep 29, 2011, 12:59:58 PM9/29/11
to RoboFab
I am running Lion with py 2.71 installed and the [4283] build of FLS
5.1 and have tried the script posted above with no luck. I get err
message: Traceback (most recent call last):
File "", line 29, in
ImportError: No module named robofab.world

On Sep 29, 1:11 am, Erik van Blokland <letter...@gmail.com> wrote:
> Hey,
> I've spent a couple of days on a robofab dialogs replacement.
>
> Vanilla based dialogs works well in RoboFont and Glyphs. Fontlab 5.01 can use dialogKit. FontLab 5.1 on 10.6 has odd, hard to trace problems with vanilla. Sometimes it works, often they don't. I am leaning towards using dialogKit for 5.1 as well, though that raises other issues.
> I have made some changes to my OSX installation that makes it easier to test in both 10,8 and 10.7.
>
> I will keep you posted, I'm sorry it's taking so long.
>
> Erik
>
> On 29 sep. 2011, at 02:35, Mark Simonson <mark...@bitstream.net> wrote:
>
>
>
>
>
>
>
> > On Sep 28, 2011, at 6:45 PM, Tal Leming wrote:
>
> >>> Is it possible to use RoboFab with FontLab 5.1?
>
> >> Yes, with a caveat....
>
> > Would you mind if I posted these instructions on Typophile? The question came up, which is why I asked here in the first place.
>
> > Mark
>
> > --
> > You received this message because you are subscribed to the Google Groups "RoboFab" group.
> > To post to this group, send email to rob...@googlegroups.com
> > To unsubscribe from this group, send email to robofab-u...@googlegroups.com
> > For more options, visit this group athttp://groups.google.com/group/robofab?hl=en

Erik van Blokland

unread,
Sep 29, 2011, 1:06:09 PM9/29/11
to RoboFab

Can you describe how you installed robofab?

Dezcom

unread,
Sep 29, 2011, 4:32:28 PM9/29/11
to RoboFab
Yes, Here is the process I used (same as above from Tal):
1. If you don't have it already, get the "RoboFab + FontTools +
DialogKit Combo" zip here: http://robofab.com/download/index.html
2. Unpack the zip and put it in a location where you want the files to
live. For example /Applications/RoboFab.
3. Open Terminal.
4. Type "cd " (the space is required) and drag the FontTools folder to
the Terminal window. This should give you something like "cd /
Applications/RoboFab/FontTools". Hit return.
5. Type "sudo python setup.py install". Hit return.
6. A bunch of installation notes should appear.
7. Type "sudo python " (the space is required) and drag the install.py
file in the RoboFab directory to the Terminal window. Hit return.
8. "Robofab is now installed." should appear along with some other
text.
9. Type "sudo python " (the space is required) and drag the install.py
file in the DialogKit directory to the Terminal window. Hit return.
10. "dialogKit is now installed." should appear along with some other
text.
11. Restart FontLab if you have it open.


bodoni george

unread,
Oct 4, 2011, 11:19:30 AM10/4/11
to RoboFab
Fontlab 5.1 is using Python 2.6.1 but the RoboFab installation from
Tal keeps writing to Python 2.5. How do I go about fixing this so
RoboFab writes to 2.6 or can I simply drag the files from 2.5 to 2.6?
Should I delete all the old versions of Python? There's a lot of
clutter.
George

Tal Leming

unread,
Oct 4, 2011, 11:23:46 AM10/4/11
to rob...@googlegroups.com

Did you follow the instructions I posted to this list last week?

Tal

Joancarles Casasin

unread,
Oct 4, 2011, 11:29:01 AM10/4/11
to rob...@googlegroups.com
I'm not sure deleting Python old versions is a good idea.
A quick fix I use is to point to add robofab's path from a FontLab script as:

>>>
import sys
sys.path.append(Yourpathtorobofablibrary)
>>>

I'm almost sure there's a way to make it run automatically each time you launch FontLab. I run it manually as I'm not using it too much now.

I hope this help while a more clever solution comes.

Cheers,

Joancarles

> --
> You received this message because you are subscribed to the Google Groups "RoboFab" group.
> To post to this group, send email to rob...@googlegroups.com
> To unsubscribe from this group, send email to robofab-u...@googlegroups.com

> For more options, visit this group at http://groups.google.com/group/robofab?hl=en


>
> Messages from newly joined members are subject to moderation.
> Download RoboFab and documentation at http://robofab.com

••••••••••••••••••••••
casasin.com
••••••••••••••••••••••
cosesmeves.posterous.com

bodoni george

unread,
Oct 4, 2011, 10:56:23 PM10/4/11
to RoboFab
I copied all the 2.5 files to 2.6 in Library and Sys/Library and
Frameworks. What apparently worked was changing the "Current" alias to
2.6. Everything is working now. Hope it lasts.

On Oct 4, 10:29 am, Joancarles Casasin <joa...@casasin.com> wrote:
> I'm not sure deleting Python old versions is a good idea.
> A quick fix I use is to point to add robofab's path from a FontLab script as:
>
>
>
> import sys
> sys.path.append(Yourpathtorobofablibrary)
>
>
>
> I'm almost sure there's a way to make it run automatically each time you launch FontLab. I run it manually as I'm not using it too much now.
>
> I hope this help while a more clever solution comes.
>
> Cheers,
>
> Joancarles
>
> On 04/10/2011, at 17:19, bodoni george wrote:
>
> > Fontlab 5.1 is using Python 2.6.1 but the RoboFab installation from
> > Tal keeps writing to Python 2.5. How do I go about fixing this so
> > RoboFab writes to 2.6 or can I simply drag the files from 2.5 to 2.6?
> > Should I delete all the old versions of Python? There's a lot of
> > clutter.
> > George
>
> > --
> > You received this message because you are subscribed to the Google Groups "RoboFab" group.
> > To post to this group, send email to rob...@googlegroups.com
> > To unsubscribe from this group, send email to robofab-u...@googlegroups.com
> > For more options, visit this group athttp://groups.google.com/group/robofab?hl=en

bodoni george

unread,
Oct 4, 2011, 11:21:24 PM10/4/11
to RoboFab
Yes, repeatedly. Several times, over and over. As far as I can tell
the "Current" alias was set to 2.5 not 2.6. Copying the files from 2.5
to 2.6 and changing the alias has fixed it.
It would be helpful if there was a list of what items are supposed to
end up where in addition to the install instructions so one could
double check.
Any idea why the alias was set to 2.5 instead of 2.6? Is that a
result / artifact of the earlier "fake" 2.3 / 2.5 install from the
FontLab site?
George

Erik van Blokland

unread,
Oct 5, 2011, 1:46:03 AM10/5/11
to rob...@googlegroups.com

On 5 okt 2011, at 05:21, bodoni george wrote:


Any idea why the alias was set to 2.5 instead of 2.6? Is that a
result / artifact of the earlier "fake" 2.3 / 2.5 install from the
FontLab site?

Could be. It's non-standard, you must have changed it before. Swapping the 2.3 to 2.5 is a very nasty hack. I believe Adam had prefaced his instructions with a warning about unexpected side effects. I guess losing time is one of them :(

So. The 'python' command really should link to whichever version your OSX came with, unless you know what you're doing. (not to dis your skills, but I've worked with python for some time now, and I prefer to leave the system pythons alone) If you want to find out which python corresponds to the plain "python" command, type "python" in the terminal. On my system that is:

bash-3.2$ python
Python 2.6.2 (r262:71600, Apr 16 2009, 09:17:39) 

If you want to talk to a different version, you can try this: python<version>. For instance:

bash-3.2$ python2.5
Python 2.5.4 (r254:67916, Jun 24 2010, 21:47:25) 

Caveat 1: the version has to be installed  (obviously) .
Caveat 2: the 2.3.5 installation in OSX 10.6 is so old it doesn't have a command line front end anymore

Hope that helps.
Erik

bodoni george

unread,
Oct 5, 2011, 4:53:42 PM10/5/11
to RoboFab
The problem must have been the "very nasty" hack of yore since the
'python' command always wrote to 2.5 even though FL said it was using
2.6.1. Don't understand why installing a new system didn't overwrite
it. Also had to add 2.6 to the various site packages. As for my skills
I'm a designer not a programmer though I did learn some Basic back in
the IIe days and usually can muddle through most things like this.
Still would like something that told me what files were supposed to go
where in order to trouble shoot things like this. Not just for python
but for all installs.
Sorry Tal if my earlier response sounded smarmy, but was really tired
from hitting my head against the wall.

David Vereschagin

unread,
Oct 23, 2011, 4:31:55 PM10/23/11
to RoboFab
On Sep 28, 7:45 pm, Tal Leming <t...@typesupply.com> wrote:
> On Sep 28, 2011, at 7:13 PM, Mark Simonson wrote:
>
> > Is it possible to use RoboFab with FontLab 5.1?
>
> Yes, with a caveat.

(My apologies to Tal: I previously sent a very similar message as a
reply to author instead of a reply to the group).

I've followed Tal's instructions to the letter. The OS and FontLab
both say they are using 2.6 and that is where the installation has put
the files, but I'm not getting any RoboFab macros in FL 5.1 under OS X
10.6.8.

I've also tried running a FL macro as per Joancarles Casasin's
suggestion, but I clearly don't know what I'm doing, as I don't know
what the correct path should look like -- I keep getting script
errors.

At this point I'm thinking of trying another RoboFab installation for
FL 5.0.4. But my transition to Lion will have to happen sooner or
later and 5.1 runs so much faster 5.0.4. And will doing another
install actually work?

Any suggestions, anyone?

--
David Vereschagin
Quadrat Communications

Erik van Blokland

unread,
Oct 23, 2011, 4:56:20 PM10/23/11
to rob...@googlegroups.com

On 23 okt. 2011, at 22:31, David Vereschagin <goo...@quadrat.com> wrote:

> Any suggestions, anyone?

Is there any sign of a non-beta release of 5.1?

Erik

David Vereschagin

unread,
Oct 23, 2011, 4:59:47 PM10/23/11
to RoboFab
On Oct 23, 4:56 pm, Erik van Blokland <letter...@gmail.com> wrote:

> Is there any sign of a non-beta release of 5.1?

Not yet, apparently. I installed the latest build (4311) yesterday. I
do understand that this will be easier to deal with once there's an
official, stable, release.

--
David

Tal Leming

unread,
Oct 23, 2011, 8:20:27 PM10/23/11
to rob...@googlegroups.com

On Oct 23, 2011, at 4:31 PM, David Vereschagin wrote:

> I've followed Tal's instructions to the letter. The OS and FontLab
> both say they are using 2.6 and that is where the installation has put
> the files, but I'm not getting any RoboFab macros in FL 5.1 under OS X
> 10.6.8.

When you say "RoboFab macros," what do you mean? The macros that appear in the Maacro toolbar menu? If you run this in the Macro panel, do you get a traceback?

import robofab

Tal

David Vereschagin

unread,
Oct 24, 2011, 10:03:01 AM10/24/11
to RoboFab
On Oct 23, 8:20 pm, Tal Leming <t...@typesupply.com> wrote:

> When you say "RoboFab macros," what do you mean? The macros that appear in the Maacro toolbar menu?

Yes, that's where I expected them to show up. There's nothing
additional there. I now see I can run the RoboFab macros by opening
and running them from the Edit Macros panel. Is this the correct way
to run them?

> If you run this in the Macro panel, do you get a traceback?
>
>         import robofab

Just putting that into the Edit Macros panel and running it I get
nothing, no errors, no response; nothing appears to happen.

--
David Vereschagin

Tal Leming

unread,
Oct 24, 2011, 10:08:39 AM10/24/11
to rob...@googlegroups.com

On Oct 24, 2011, at 10:03 AM, David Vereschagin wrote:

>> When you say "RoboFab macros," what do you mean? The macros that appear in the Maacro toolbar menu?
>
> Yes, that's where I expected them to show up. There's nothing
> additional there. I now see I can run the RoboFab macros by opening
> and running them from the Edit Macros panel. Is this the correct way
> to run them?

Ah. The instructions I gave were for installing the RoboFab library, not the scripts. If you want to install the scripts you'll need to manually drag them to ~/library/application support/FontLab/whatever/whatever/whatever.

>> If you run this in the Macro panel, do you get a traceback?
>>
>> import robofab
>
> Just putting that into the Edit Macros panel and running it I get
> nothing, no errors, no response; nothing appears to happen.

Then RoboFab is installed.

Tal

Joancarles Casasin

unread,
Oct 24, 2011, 10:23:58 AM10/24/11
to rob...@googlegroups.com

On 24/10/2011, at 16:03, David Vereschagin wrote:

> On Oct 23, 8:20 pm, Tal Leming <t...@typesupply.com> wrote:
>
>> When you say "RoboFab macros," what do you mean? The macros that appear in the Maacro toolbar menu?
>
> Yes, that's where I expected them to show up. There's nothing
> additional there. I now see I can run the RoboFab macros by opening
> and running them from the Edit Macros panel. Is this the correct way
> to run them?

Well, you can select and run directly without opening them from the macro Toolbar.

>> If you run this in the Macro panel, do you get a traceback?
>>
>> import robofab
>
> Just putting that into the Edit Macros panel and running it I get
> nothing, no errors, no response; nothing appears to happen.

If you don't get a Traceback it means it works...

------piece of code------------------------

from robofab.world import CurrentFont

f = CurrentFont()
print f
-------------------------------------------

You should get printed out in the output window the current font.


I'm exhausted with this issues, now with Build 4311 my ugly patch is neither working.
I add the robofab path to sys.path running a script and now I get a traceback
"""
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/numpy/lib/polynomial.py", line 11, in <module>
import numpy.core.numeric as NX
AttributeError: 'module' object has no attribute 'core'
"""

It seems coming from numpy but I added it manually as I did before...
My Terminal is using Python 2.6.6 and FontLab is using Python 2.6.1, anyone knows how to fix this? Probably the problem is there around as I can use robofab through the Terminal...


Joancarles
[Really waiting for RoboFont 1.1 update]

••••••••••••••••••••••
casasin.com
••••••••••••••••••••••
cosesmeves.posterous.com

Joancarles Casasin

unread,
Oct 24, 2011, 10:31:54 AM10/24/11
to rob...@googlegroups.com

On 24/10/2011, at 16:23, Joancarles Casasin wrote:

> I'm exhausted with this issues, now with Build 4311 my ugly patch is neither working.
> I add the robofab path to sys.path running a script and now I get a traceback

I'm still exhausted but now it's working.
Don't ask me why but it does, seems enough by now. Probably I won't install any other build...

jca

••••••••••••••••••••••
casasin.com
••••••••••••••••••••••
cosesmeves.posterous.com

David Vereschagin

unread,
Oct 24, 2011, 11:32:22 AM10/24/11
to RoboFab
On Oct 24, 10:08 am, Tal Leming <t...@typesupply.com> wrote:

> Ah. The instructions I gave were for installing the RoboFab library, not the scripts.
> If you want to install the scripts you'll need to manually drag them to
> ~/library/application support/FontLab/whatever/whatever/whatever.

Aha! Success! Thank you for walking me through this, Tal. I am just
starting to use the UFO format in my workflow, and I hope this will
aid me considerably.

--
David Vereschagin

Dezcom

unread,
Oct 24, 2011, 3:47:05 PM10/24/11
to RoboFab
How did you get it working and was it on Lion? Lion uses 2.7 as
default, I even tried 3.2 and still fail. At least with 4311 I can
output an otf without a crash but I cannot export a UFO even though
the script shows up, it fails.
Frustration mounts, but not running scripts :-/

Chris

Tal Leming

unread,
Oct 24, 2011, 4:34:50 PM10/24/11
to rob...@googlegroups.com

On Oct 24, 2011, at 3:47 PM, Dezcom wrote:

> How did you get it working and was it on Lion? Lion uses 2.7 as
> default, I even tried 3.2 and still fail. At least with 4311 I can
> output an otf without a crash but I cannot export a UFO even though
> the script shows up, it fails.

Please provide us with a transcript of your activity in Terminal. (Make a new Terminal window, do the installation process, copy and paste all of the text in Terminal and send it to us.) It's impossible to figure out what went wrong without any info.

> Frustration mounts, but not running scripts :-/

Well, FontLab 5.1 is still beta software so you shouldn't expect everything to be frustration free. RoboFab is a bit of code that Erik and I wrote and now maintain on a strictly *volunteer* basis. We're quite busy with UFO 3 (another volunteer project) and WOFF (yet another volunteer project) these days. We are doing what we can when we can.

Tal

Erik van Blokland

unread,
Oct 24, 2011, 5:25:47 PM10/24/11
to rob...@googlegroups.com
Folks,

On 24 okt 2011, at 21:47, Dezcom wrote:

> How did you get it working and was it on Lion? Lion uses 2.7 as
> default, I even tried 3.2 and still fail. At least with 4311 I can
> output an otf without a crash but I cannot export a UFO even though
> the script shows up, it fails.

If you want to help, it might be useful to understand that given the dozens of modules and literally thousands of lines of code, we could be helped with more detail than "it fails". Given that FontLab 5.1 is a moving target, it is very difficult for me to build and rebuild installers for each new instance of the application. We've been busy updating parts of robofab (some of it documented here). I'd rather everyone is aware of the swamp we're all wading through and everyone would use a bit of common sense.

Aside: I'm not grumpy, I'm just tired and typing fast. I'm *not* saying a couple of things and that's about as far as my diplomacy goes this evening.
So here are some basics of finding your way around python. Not in any particular order, and not offered as a solution to any specifc problem.

A Junior Woodchucks Guidebook to survival in a beta FontLab:

When something goes wrong in Python, it prints a detailed message of what went wrong. This is called "a traceback". Sometimes tracebacks help to determine where the problem is. Copying such a traceback in an email is a very helpful step.

Keeping track of what you did is also good. Just keep a small log somewhere. Stuff like "October 24, 2011, installed Numpy 1112, from http//ccc.com. Instructiuons at http://zzzz.com I can import it in python 2.6.1". That will remind you how you ended up in a particular situation.
"it just stopped working" doesn't happen (well, it does crash, doesn't it?). But modules that were importable, and then they;re not means that you changed something, or did something. Computers rarely change these things themselves. If something breaks, you're probably involved. And that's ok too. But remember what you did, mention this in your report. Try to retrace the steps. Can you undo whatever it was? Can you repeat the problem? Unrepeatable problems are a lot less likely to be solved than repeatable ones.

In your Applications/Utilities folder there is an application called "Console". This is like FontLab's Macro output window, but this prints stuff from all applications that currently run. That means a lot of data passes by here and you wouldn't want to paste all of it in an email. Instead you can use the handy Search box at the top right. When I type "fontlab" in mine, I get entries like this:
22-10-11 12:42:02 com.apple.launchd.peruser.501[275] ([0x0-0x392392].com.fontlab.studio5[9559]) Exited: Terminated
This particular one is not very helpful, but sometimes there are interesting bits to be found. Just another place to keep an eye on, Even I forget sometimes.

#To find out which version of python you're using:
# On my 10.6.8 machine, here are some of the results:
# this is what I type in the macro window
import sys
print sys.version

# this is what prints to the output (I added the >> to indicate it is returned). It is not right or wrong, it's just the version. But it helps.
>> 2.5.4 (r254:67916, Aug 1 2011, 15:52:49)
>> [GCC 4.2.1 (Apple Inc. build 5646)]
# see that this is not necessarily "the newest"
# the good news is, this python is new enough so we can also talk to it using the Terminal.app.

# this will tell me the version of the application
from FL import *
print fl.version
>> 5.1/Mac(Build 4269)
# that might not be the newest, but there it is.

# if you want to see if robofab is installed, type:
import robofab
# if everything works, nothing is returned. It just works. if you want to see if FontLab's python (or any other python) can import a module, it is good to just try that one line code. If it works, try more complex things. If it doesn't, you have something to look into.
# you can then also try something like this to see where the module actually lives:
print robofab.__file__
>> /Users/erik/Develop/svn.robofab.com/trunk/Lib/robofab/__init__.pyc

As you can see, this list is not complete. It doesn't tell you what to do. We really want to urge *all* *you* *testers* to help us. Especially the ones that have something working. Not just wait until Tal or me somehow find time to magically fix everything. If you have discovered a working recipe, please post it here. Here are some subjects that would be very helpful for some of you to fill in:

1. a step by step list of how to install the current svn trunk from svn.robofab.com
2. a step by step list of how to install fontTools 2.3 from sourceforge,net
3. a step by step list of how to install numpy
4. a short (and possibly more polite) set of instructions of how to debug, and report problems in A Helpful Manner
5. I'm sure there will be a number 5.

Good luck Junior Woodchucks!
Erik

Schrijver

unread,
Oct 24, 2011, 6:03:44 PM10/24/11
to rob...@googlegroups.com
> 1. a step by step list of how to install the current svn trunk from svn.robofab.com
> 2. a step by step list of how to install fontTools 2.3 from sourceforge,net
> 3. a step by step list of how to install numpy
> 4. a short (and possibly more polite) set of instructions of how to debug, and report problems in A Helpful Manner
> 5. I'm sure there will be a number 5.


Okay, so these instructions work for 10.6 but it should work for 10.7 as well.

All of this requires some level of comfort with terminal.app
Luckily, most command line utilities you need will come preinstalled with your mac.

The only thing that would be handy to install additionally is Apple’s xCode, which installs a C(++) compiler. Some of the Python packages like numpy and fontTools have additional C stuff. (Although I never tried without xCode, so I”m not sure if it’s 100% prerequisite)
xCode comes on your installer DVD under extra software, or you can download it via http://dev.apple.com/

To install python modules, the easiest is to use easy_install:
sudo easy_install numpy

Fonttools is also in the python package index, but the version is outdated—maybe you can push a new package Just?

For now, download from http://sourceforge.net/projects/fonttools/
unpack, in the terminal, navigate to the folder, and run:
sudo python setup.py install

You need a directory to keep track of source code of programs you build from source.
If you don’t have such a directory, create a folder called src in your home folder.
Then, from the terminal

cd ~/src
svn checkout http://svn.robofab.com/

A new folder called svn.robofab.com will be created, containing the most recent code.
To install this version

cd svn.robofab.com/trunk
python install.py

to later update your version of robofab, you navigate to ~/src/svn.robofab.com and run

svn update

Joancarles Casasin

unread,
Oct 25, 2011, 4:07:54 AM10/25/11
to rob...@googlegroups.com
Running SL 10.6.8, not Lion.

When having any error or issue try to send the traceback or errors printed out in the output window. It will help to understand what's going on.


On 24/10/2011, at 21:47, Dezcom wrote:

> How did you get it working and was it on Lion? Lion uses 2.7 as
> default, I even tried 3.2 and still fail. At least with 4311 I can
> output an otf without a crash but I cannot export a UFO even though
> the script shows up, it fails.
> Frustration mounts, but not running scripts :-/


jca

••••••••••••••••••••••
casasin.com
••••••••••••••••••••••
cosesmeves.posterous.com

Dezcom

unread,
Oct 26, 2011, 5:25:23 PM10/26/11
to RoboFab

Schrijver

unread,
Oct 26, 2011, 8:01:55 PM10/26/11
to rob...@googlegroups.com
Hello,

Op 26 okt 2011, om 23:25 heeft Dezcom het volgende geschreven:

I followed directions from the last site above and have installed
"homebrew", pip, and virtualenv, and the OSX gcc installer of Xcode4
just to try tofind a way to get "numPy" to work.  Apparently, all
refernces to "pyton.world" are part of some numpy code

Actually, what went wrong is that pip didn’t get installed:


Dezcom-iMac:~ DezcomHome$ easy_install pip
error: can't create or remove files in install directory


That’s why all the subsequent pip commands fail too, and numpy doesn’t get installed.
It’s a file permissions eror:

The following error occurred while trying to add or remove files in
the
installation directory:

   [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/
test-easy-install-35814.write-test'

To make it work, run:

  sudo easy_install pip

Sudo makes the command run as the ‘root’ user with all privileges.
Now you should be able to use pip to install numpy.

If you want to skip the whole pip thing, you can also run directly:

  sudo easy_install numpy

This will install numpy globally.
Hope this helps,

Eric S

Dezcom

unread,
Oct 26, 2011, 8:25:21 PM10/26/11
to RoboFab
Thanks, Eric!

I got numpy to load, now to try to run the ufo script again, with
fingers crossed.

Chris

Dezcom

unread,
Oct 28, 2011, 2:05:59 AM10/28/11
to RoboFab
I tried it and got the same error as always:
Traceback (most recent call last):
File "<string>", line 29, in <module>
ImportError: No module named robofab.world

Then, I reinstalled RoboFab as per Tal's instructions but that did not
help. I still got Traceback (most recent call last):
File "<string>", line 29, in <module>
ImportError: No module named robofab.world

Then, I reinstalled numPy and tried again withe the same results:
Traceback (most recent call last):
File "<string>", line 29, in <module>
ImportError: No module named robofab.world

Somehow, I think that RoboFab, numPy, and FLS5.1 are not on the same
page? I just don't know why. FLS5.1 is obviously seeing enough that
the script is available for selection. FLS is just not connecting all
the dots to run it properly.

Well, enough for one night, it is already after 2:00 am.

Chris

Erik van Blokland

unread,
Oct 28, 2011, 2:26:48 AM10/28/11
to rob...@googlegroups.com

On 28 okt 2011, at 08:05, Dezcom wrote:

Somehow, I think that RoboFab, numPy, and FLS5.1 are not on the same
page? I just don't know why. FLS5.1 is obviously seeing enough that
the script is available for selection.  FLS is just not connecting all
the dots to run it properly.

Hi Dez,

in your experiments, did you get svn to run? (this is not telling you to do so, just an inquiry whether you did).

Erik

Dezcom

unread,
Oct 28, 2011, 3:33:57 AM10/28/11
to RoboFab
Erik,
I have not noticed "svn" and am not even sure what that means ;-)
Each time I installed something, I entered its name and it responded
the name and version back. I assumed this was some kind of
verification that the newly installed stuff was found by python.

Just now, I tried reinstalling the entire RoboFab suite with
dependencies to no avail. Then, I just dragged and dropped the
"export to ufo script files" to the same location in my computers
"library" folder as the RMS tools live. I tried this because RMX
tools works just fine. But, that did not work either. I still cannot
manage to get FontLab to make nice with any of the RoboFab tools. It
is still desperately looking for "robofab.world" and can't find it.
Thanks for giving it some thought, Erik. Now to sleep before the sun
rises.

Chris

Erik van Blokland

unread,
Oct 28, 2011, 3:43:09 AM10/28/11
to rob...@googlegroups.com
Folks,

for those of you using the svn version of RoboFab, 2 changes:

Reduced dependency NumPy in arrayTools and bezierTools.
RoboFab depends on FontTools, FontTools depends on Numpy. Numpy is a !@#$ to install. FontTools really needs Numpy for TTX stuff. But the things RoboFab needs done by FontTools are much more specific.

We took a good look at what actually goes on between FontTools, robofab and Numpy. To answer the inevitable "why didn't you do this years ago?" - NumPy is a package for array calculations: large collections of numbers. It can do this at great speed as the moving parts in NumPy are written in C, which accounts for some of the installation difficulties. When Just wrote FontTools (in 2001), Numpy was a necessary dependency. Python alone was way too slow to process the data. On current hardware, the race between python and NumPy is on. Frederik' s speed tests show that in glyphs over 500 points NumPy is still faster, but for more modest glyphs, a pure python version is now faster. The threshold will only move in favor of Python.

So Frederik managed to rewrite two modules, fontTools.misc.arrayTools and fontTools.misc.bezierTools in python, without NumPy. Ideally those would move into the fontTools trunk at some point. For now, I've checked them into the robofab svn trunk at robofab.misc.arrayTools and robofab.misc.bezierTools. Imports of the fontTools versions in the robofab trunk have been diverted.  Test and speed comparisons are in robofab.misc as well.

Highly experimental installer script for robofab on OSX
Note: I hope the following explains the problems of building an installer in some detail and invites some of you to take a look and help figure stuff out. 
The poll results show that most users are still on 5.04 with the 2.3.5 python. And then there is a wide range of FontLab builds using a wide range of Pythons. Often users have a whole collection of FontLabs on one machine. It would be nice if we could address all of these in a single installer. Such an installer would have to address these issues:
1. installer can't run in FontLab itself as FontLab doesn't provide the __file__ parameter. That means that a script running in FontLab can't find out which folder it has been loaded from. So it can't find its payload, or the whole package has to be embedded in the script. (David Březina's installer model). But RoboFab and FontTools are too big to be stringified into a single script. 
2. installer needs hook up multiple Python versions with a single module. I really don't want to dump duplicate copies of robofab and fonttools in every Python used by FontLab. I want multiple *.pth files pointing to a single repository. But an external python installer can't figure out which Python each FontLab is using.
3. Not only install RoboFab, but also FontTools, DialogKit, friends
The script installModuleForFontLabOSX.py in trunk/Tools/ tries to address these two points. It uses available data (where the payload is) to write a new FontLab script - (Adam / David's *.flw proposal). 
4. Deal with a lot of different installations. Multiple python versions, multiple instances of the same python (!). Pythons without site-packages folders (!), Multiple architectures (Py2.3.5 PPC, Py2.7.1 Intel and inbetween) and OS versions. Ideally also Windows. 

From the docs:

    Installer for RoboFab for FontLabs on OSX
    
    Operation:
        1.  This script builds a .flw with the right paths hardwired.
        2.  Then calls all of the FontLab applications it can find to run the .flw script.
            This ensures the paths are written to exactly the right Pythons. 
        3.  The .flw finds out which site-packages can be used to install in.
        4.  Then it places a *.pth file pointing to the current location of the
                robofab/trunk/Lib folder
            This means the setup is a bit more fragile, for instance if you
            move or rename the folder that contains robofab. But it also makes
            it possible for multiple fontlabs to point to a single install of robofab. 
        5.  Logs are kept.
        6.  SAVE YOUR WORK IN RUNNING FONTLAB APPLICATIONS BEFORE RUNNING THE INSTALLER.
            This script will instruct FontLab to quit at the end of the installation.
            Unsaved work will be lost.

This is a two stage installer. First the main script is run using a normal system python. Then it will generate application specific *.flw scripts and call for the FontLabs to run them. You might see several hopping icons in the dock. 
In my experiments (and some by daring friends) this system seems to work. But it is not a magic solution. For instance:
- if you have a 5.04 and one 5.1 beta installed, it will work (Snow Leopard)
- if you have multiple 5.1 betas installed, it will run them all (it has to get to all of their Pythons), This seems to result in some fighting over the log files, but in general the linking seems to work.
- currently it only links to RoboFab, because it is not part of a distribution with the other packages. One step at a time. 

On Lion (where we really want this to work), it seems the permissions needed to write in site-pacakges are higher than on 10.6. Running the main installer script with sudo is only a partial solution - the FontLab scripts would want to do the writing in site-packages and those processes have not started as sudo (as far as I can tell). If that is the case (some empirical feedback would be appreciated) I might have to restructure the installer in which the FontLabs only compile some data about which python they're using and return this data to the main installer which is running with sudo. Then it can write the appropriate files. 
One other thing I have to look into is to see if 2,7 on Lion has other site-packages locations that can be written to by a normal user. Feedback on both of these would be great.

Still reading? Thanks! Here is a recap just for you:
- Eventually this installer and various other modules would be combined in a single package. This is only one component of such a package. 
- On Snow Leopard this script neatly links robofab to 5.04 and 5.1.
- Many many different FontLab and Python configurations around. Can't test or even imagine them all. Use at own risk. Contribute.
- when will it all be ready? Well, this was day 3 of full time unpaid installer hackery, I have some work to catch up with. So here is some homework:
- Reports would be nice.
- Reports with more info than "it doesn't work" would be splendid. (use what you've learned in the first semester. Look at the logs too).
- Reports with "it didn't work, but I looked into it and if you change line X into this" would be absolutely awesome. 
- Reports with "I fixed it and I took the liberty of building a packagemaker installer, here is the plist" will be rewarded with a Junior Woodchuck Installermaker Patch at a special ceremony during the next Robothon.

Finally, here is a bit of text in all-caps.
THIS INSTALLER IS EXPERIMENTAL. IT WILL TRY TO CHANGE THINGS IN YOUR SYSTEM, THAT IS ITS JOB. IT WILL MAKE YOUR FONTLABS RUN SCRIPTS AND THEN QUIT. SO DON'T LEAVE ANY UNSAVED FILES OPEN. YOU KNOW WHAT, CLOSE ALL OPEN FONTLABS FIRST JUST TO MAKE SURE. USE AT YOUR OWN RISK. 

Cheers,
Erik

Erik van Blokland

unread,
Oct 28, 2011, 3:47:13 AM10/28/11
to rob...@googlegroups.com
On 28 okt 2011, at 09:33, Dezcom wrote:

I have not noticed "svn" and am not even sure what that means ;-)
Each time I installed something, I entered its name and it responded
the name and version back.  I assumed this was some kind of
verification that the newly installed stuff was found by python.



Just now, I tried reinstalling the entire RoboFab suite with
dependencies to no avail.  Then, I just dragged and dropped the
"export to ufo script files" to the same location in my computers
"library" folder as the RMS tools live.  

These scripts are only for the FontLab macro folder. They will try to load main robofab modules. So that won't work. 

I tried this because RMX
tools works just fine.  But, that did not work either.  I still cannot
manage to get FontLab to make nice with any of the RoboFab tools. It
is still desperately looking for "robofab.world" and can't find it.
Thanks for giving it some thought, Erik.  Now to sleep before the sun

Sounds like you're installing stuff alright, but to another python. Did you run that poll script that I sent to the list a couple of days ago?

Erik

Paul van der Laan

unread,
Oct 28, 2011, 4:30:10 AM10/28/11
to rob...@googlegroups.com

Thanks Erik for all the effort so far!

With regards to the installer: personally I wouldn't care about supporting the FL betas that have been released for the last months. Most of them were so bug-ridden I can hardly imagine that anyone would favour them over the current official 5.1 update.

So Frederik managed to rewrite two modules, fontTools.misc.arrayTools and fontTools.misc.bezierTools in python, without NumPy. Ideally those would move into the fontTools trunk at some point. For now, I've checked them into the robofab svn trunk at robofab.misc.arrayTools and robofab.misc.bezierTools. Imports of the fontTools versions in the robofab trunk have been diverted.  Test and speed comparisons are in robofab.misc as well.

This alone is fantastic news. Thank you Frederik!

-Paul

Dezcom

unread,
Oct 28, 2011, 1:55:04 PM10/28/11
to RoboFab
Dear Erik and Eric,
I finally got my RoboFab scripts running in FLS 5.1 with Lion 10.7.2!
Adam Twardoch sent me a set of instructions early this morning which
he has since posted to the FontLab Forum
http://forum.fontlab.com/python-scripting/instructions-installing-robofab-12-rev-226-in-fls-51-on-mac-os-x-1072-t8300.0.html

Here is a copy of my note to Adam following my success in using his
new instructions:
"Adam,
With the greatest of glee!!! I report to you that I finally got that
mother fucker to work!!!
First I did as you said and dumped the "Python for Grownups" files.
Then I rebooted and tried the UFO script with still no result.
I then followed your detailed recipe for reinstalling the robofab
suite (Your script was great except for your typo saying "Skip to step
8" which perhaps was intended to say "step 11"?) but even a true
Python dummy like me was able to figure that out ;-P
I then rebooted and opened FontLab nervously; I opened one of my VFB
files and ran the "export to UFO2" script.
BAM!!! That mutha ran like Bolt from the blocks at the Olympics!
I now have created my first actual ufo file, holy shit!

Thanks MORE than very much!!!

I hope you will post this et of instructions to both the FontLab Forum
and to the RoboFab Forum and boast that you even got that bonehead
Lozos to get his working!!! ;-D

Regards,

Chris Lozos"

Dezcom

unread,
Oct 28, 2011, 2:01:28 PM10/28/11
to RoboFab
With the official release of FLS 5.1 by FontLab, all of the old beta
builds prior to the released version are null and void anyway. I am
sure FontLab will continue testing the released version and at some
point post an updated build but I can't see any value in looking at
the older builds.

Chris

Dezcom

unread,
Oct 28, 2011, 2:46:45 PM10/28/11
to RoboFab
Erik,

THANKS!!! Your recent post above makes the whole thing orders of
magnitude clearer to me now. Since I am the benchmark for the
"Severely Python Challenged", I assume the upperclassmen here have
even gotten more out of it than I did :-) The "Force" is not with me
quite yet, but at least, I will know it when I finally see it ;-)

Chris

On Oct 28, 3:43 am, Erik van Blokland <letter...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages