Installing Fontforge

cdavidson's picture

I've decided to battle through the fontforge installation process again, and I am hit my this error in the terminal:

Error: can't convert nil into String
Please report this bug:
https://github.com/mxcl/homebrew/wiki/reporting-bugs
/usr/local/Library/Homebrew/extend/string.rb:18:in `gsub!'
/usr/local/Library/Homebrew/extend/string.rb:18:in `gsub!'
/usr/local/Library/Formula/fontforge.rb:47:in `install'
/usr/local/Library/Homebrew/utils.rb:235:in `inreplace'
/usr/local/Library/Homebrew/utils.rb:229:in `each'
/usr/local/Library/Homebrew/utils.rb:229:in `inreplace'
/usr/local/Library/Formula/fontforge.rb:46:in `install'
/usr/local/Library/Homebrew/build.rb:93:in `install'
/usr/local/Library/Homebrew/formula.rb:192:in `brew'
/usr/local/Library/Homebrew/formula.rb:524:in `stage'
/usr/local/Library/Homebrew/extend/fileutils.rb:22:in `mktemp'
/usr/local/Library/Homebrew/formula.rb:520:in `stage'
/usr/local/Library/Homebrew/formula.rb:187:in `brew'
/usr/local/Library/Homebrew/build.rb:72:in `install'
/usr/local/Library/Homebrew/build.rb:35
/usr/local/Library/Formula/fontforge.rb:54

Does anyone know how to fix this problem? What's concerning is that this is the second application (the first being Homebrew, which is the installer itself) I've installed on this computer, and I'm already getting errors.

Many thanks.

Té Rowan's picture

I'm pretty clueless about Ruby, so the only advice I can give is to check if this has been reported and if there's a fix already.

cuttlefish's picture

FontForge is a great program for font design if you can get it running. That's the hard part. You should subscribe to the Devel and User mailing lists mentioned on the FontForge website, and ask your questions there, with as much detail as you are able. There are people there much more skilled than I am who can help.

Karl Stange's picture

Have you tried using MacPorts?

cdavidson's picture

Thanks Karl. MacPorts did the trick, I have it running now.

For the record (and if anyone else wants to know how to install fontforge on a Mac):

1. Download a MacPorts Package Installer from http://www.macports.org/install.php
2. Download Xcode from the App Store or https://developer.apple.com/xcode/
3. Once Xcode is installed, open it. Open Preferences and click the Downloads tab. Click "Install" next to "Command Line Tools".
4. Once that is installed, open Terminal and type:

sudo port install fontforge

5. Once fontforge has installed, you will find it in the MacPorts folder in Applications. Open it.
6. In the menu bar, click X11 and open Preferences. Click Pasteboard. Deselect 'Enable Syncing'

And hopefully that will do the trick.

Karl Stange's picture

Glad to hear it! I recently installed FontForge on a new Mac running Lion (10.7.3) using MacPorts and had it up and running within a couple of hours.

pieterp's picture

I had no problems installing FontForge through homebrew, albeit I'm on Snow Leopard. Did you have xcode installed before you tried to install homebrew?

cdavidson's picture

Yes.

cuttlefish's picture

I made a mistake of installing Fink, Macports, and Homebrew and trying to install Fontforge with all of them. Now my computer is full of these libraries that I can't find and Homebrew is refusing to work. How can I make a fresh start of this without reformatting my hard drive?

Michel Boyer's picture

The Macports files are in /opt/local, those for Fink are in /sw. If you want to get rid of Macports completely, the following instructions should do the job: http://guide.macports.org/#installing.macports.uninstalling ; for Fink

  sudo rm -fr /sw

should be enough (In fact, for Macports, sudo rm -fr /opt should already solve your problems).

pieterp's picture

Hm, now I'm in doubt if I had to compile other stuff as well. Could be that the FontForge Formula isn't complete enough, dependency wise.
The lastest Formula for ttfautohint isn't and the latest commit didn't get through yet. If you want to install that one, you're probably better off installing the binary package.

cuttlefish's picture

Out of desperation, I'm partitioning my drive and attempting to install Ubuntu Linux. The 64 bit disk image didn't work so I'm downloading the 32 bit version now. Then we'll see if that works and I can use FontForge again.

cuttlefish's picture

I've successfully made my Mac a dual-boot Snow Leopard/Precise Pangolin iMac. The Ubuntu Software Center offers a build of FontForge, but it is based on the horribly outdated and buggy tarball from February 2011. It works so long as you don't invoke Expand Stroke. I've not yet succeeded in attempts to build FontForge from the git repository source.

marnen's picture

There should be no need to make your Mac dual-boot or to use MacPorts in order to install FontForge—in fact, I recommend pretty strongly against both of these. MacPorts installations are really awful to maintain (I've done it—never again, I hope); Homebrew is much nicer to work with. Don't give up on it because of a faulty formula.

In this case, it looks like there was an error in the Homebrew formula for FontForge. That error appears to have been fixed since the original post; brew install fontforge was able to properly interpret the formula and start building when I tried it just now.

Summary: I'd recommend Homebrew as the best way to install FontForge on Mac OS X today.

As for dual-booting, if you really need an Ubuntu environment (which is unlikely), using VirtualBox or similar to set up a VM will be more convenient, because you won't need to reboot every time you want to use the other OS.

marnen's picture

Oh, and on recent versions of Mac OS, you'll need to install XQuartz from http://xquartz.macosforge.org .

marnen's picture

One other thing worth knowing. brew install fontforge will, by default, install only the command-line components, which are great for doing things like programmatic font conversion, but pretty sucky for actually making fonts. :) If you want to actually run the GUI, you'll need to do brew install fontforge --with-x .

Syndicate content Syndicate content