How to install FontForge on Mac OS X Lion, using Homebrew
In my research into font creation software, there was one free & open source piece that came to the top: FontForge. Some say it's even more capable than FontLab Studio, which costs around $650 and seems to be what is most often recommended. FontForge makes me think of Gimp, which is a free, open source graphics manipulation program that is equivalent to Photoshop. Clunkier, and possibly more powerful in some areas.
There are no current "normal" installer for Mac. Nor for Windows or Linux, for that matter. So to install it, it must be compiled from source. It's (almost) an easy process, so don't be scared. I only had one glitch in the installation process, and once I got over that, the installation completed.
Get Homebrew
Here's the first trick. Don't compile it from source. I mean, don't do it yourself. Let Homebrew do it for you. Installation instructions here. I already had homebrew installed, but if I remember correctly, I had to run the ruby command using sudo. I mean sudo /usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
. You should try it without sudo first. Homebrew does require xcode, which is a free download from the apple store. But it's a big download that will probably take an hour or longer.
Install fontforge, first attempt
OK, so you have homebrew installed. Great! Now let's put it to work. At your commandline, type: sudo brew install fontforge
. Homebrew should already know about fontforge, and will determine that it has some dependencies... gettext, pango, etc. etc. And these dependencies have their own dependencies. Homebrew figures all that out, downloads what it needs to, compiles stuff, and you can just watch the code in the terminal and feel all super powerful. But when I did this, it failed when installing a glib library. Tried again, same fail, except quicker. We can't get fontforge installed until this glib library is installed.
Install fontforge, second attempt, and success!
I could see that the problem was caused by a 404 on a patch file. By enabling verbose mode in homebrew and doing a little sleuthing at github, I found a fix. So if this happens to you, do this:
Using a plain text editor, open /usr/local/Library/Formula/glib.rb
, delete its contents (maybe make a backup first), and replace them with the contents of this file: https://github.com/mxcl/homebrew/blob/4b4760af7538fe62fd3dc075e8ffe2ee1a...
After I did that and ran sudo brew install fontforge
, the installation finally completed successfully! The one last thing I had to do before I could run it like a normal program was: ln -s /usr/local/Cellar/fontforge/20110222/FontForge.app /Application
. I had to do it that way becausebrew linkapps
didn't work for me.
TL;DR
- Install Homebrew
brew install fontforge
Success? Yay! Add the symlink, and you're done.
- Replace /usr/local/Library/Formula/glib.rb with https://github.com/mxcl/homebrew/blob/4b4760af7538fe62fd3dc075e8ffe2ee1a...
brew install fontforge
- Add the symlink
ln -s /usr/local/Cellar/fontforge/20110222/FontForge.app /Application
Comments
Hello, Thanks for this :)
Hello,
Thanks for this :)
After replacing the text in
After replacing the text in the plain text editor, I tried brew installing fontforge for the second time but was met with an error. This was the error:
Error: No available formula for libiconv (dependency of fontforge)
How do I go about completing Fontforge's installation without this libiconv?
Any advice/help is greatly appreciated!
You may need to update your
You may need to update your installation of homebrew:
brew update
I say this because looking at https://github.com/mxcl/homebrew/tree/master/Library/Formula I see several commit messages of "Remove spurious libiconv dependencies" about a month ago, mainly this commit: https://github.com/mxcl/homebrew/commit/ee2c3abdc07a20a5fac07fb298a73d0e...
Does that fix it?
Still doesnt work, claiming
Still doesnt work, claiming on libiconv
Error: No available formula for libiconv (dependency of fontforge)
I had the same problem, even
I had the same problem, even after the update. I found the file here:
http://pastebin.com/GiTJfuWf
And put it here:
/usr/local/Library/Formula/Libiconv.rb
Ok, Fontforge starts up,
Ok, Fontforge starts up, installed via Homebrew, however, when I try to activate Spiro points, it says:
"This version of fontforge was not linked with the spiro library, so you may not use them"
How do I make sure that library is there, and linked?
Thanks
brew install libspiro
brew install libspiro
I'm getting this error when
I'm getting this error when Homebrew tries to install fontforge:
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!'
gsub!'/usr/local/Library/Homebrew/extend/string.rb:18:in
/usr/local/Library/Formula/fontforge.rb:47:in
install'
inreplace'/usr/local/Library/Homebrew/utils.rb:235:in
/usr/local/Library/Homebrew/utils.rb:229:in
each'
inreplace'/usr/local/Library/Homebrew/utils.rb:229:in
/usr/local/Library/Formula/fontforge.rb:46:in
install'
install'/usr/local/Library/Homebrew/build.rb:93:in
/usr/local/Library/Homebrew/formula.rb:192:in
brew'
stage'/usr/local/Library/Homebrew/formula.rb:524:in
/usr/local/Library/Homebrew/extend/fileutils.rb:22:in
mktemp'
stage'/usr/local/Library/Homebrew/formula.rb:520:in
/usr/local/Library/Homebrew/formula.rb:187:in
brew'
install'/usr/local/Library/Homebrew/build.rb:72:in
/usr/local/Library/Homebrew/build.rb:35
/usr/local/Library/Formula/fontforge.rb:54
Any tips? Thanks.
Hi DAVID, thank you for this
Hi DAVID, thank you for this article.
I'd like to start designing fonts but can not get FontForge to run.
If you have a free moment over the next few days, please take a look at my homebrew issue
and hopefully, you can come up with a fix. :)
https://github.com/mxcl/homebrew/issues/14206
BEN
I used your way to install
I used your way to install fontforge on my Mountain Lion
I always easy to get error like 'Bus error: 10' and 'segmentation fault 11', when i use scroll bar go through the font.
Do you have same problem?
I'm sorry, but I don't have
I'm sorry, but I don't have that same problem. When I installed, I installed on Lion. I recently upgraded to Mountain Lion. I had to reinstall X11 from http://xquartz.macosforge.org/landing/ so that it would launch at all. Now that it is launching, I don't have any errors when scrolling.
Hello David! I can`t launch
Hello David!
I can`t launch FontForge. FontForge.app does not exist in folder with installation. There are some directories and files, but no .app file which I can launch. There were no errors while installing fontforge via brew... How can I launch it now?
It should be installed at
It should be installed at /usr/local/bin/fontforge. (That should actually be a symlink to /usr/local/Cellar/fontforge/20110222/bin/fontforge.)
You should be able to launch it by typing
fontforge
at the commandline.Thank you, but I am
Thank you, but I am experiencing the same situation. When I run the fontforge executable file, I just got an interactive shell like Python. How can I run FontForge as a GUI app?
at the end of your brew
at the end of your brew install, it likely printed out
"""
To use the Python extension with non-homebrew Python, you need to amend your
PYTHONPATH like so:
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
"""
so, run
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
, then runfontforge
and it should work!I'm still not seeing
I'm still not seeing FontForge.app.
Inside my fontforge/20120731 directory I have:
* AUTHORS
* INSTALL_RECEIPT.json
* LICENSE
* bin/
* include/
* lib/
* share/
Make sure you install with
Make sure you install with the command
brew install fontforge --with-x
so that X11 support is built-in. You'll need to have XQuartz installed, I think.Error: ==> Installing
Error:
==> Installing fontforge dependency: gettext
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/gettext-0.18.1.1.li...
curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
Error: Download failed: https://downloads.sf.net/project/machomebrew/Bottles/gettext-0.18.1.1.li...
I just followed your
I just followed your instructions without problems, but when I open the alias for fontforge, the app "quits unexpectedly." Do you have any idea how to fix this?
I'm sorry, I don't have any
I'm sorry, I don't have any idea how to fix that issue.
this is the error that comes
this is the error that comes up when I run brew doctor:
Warning: /usr/bin occurs before /usr/local/bin
This means that system-provided programs will be used instead of those
provided by Homebrew. The following tools exist at both paths:
Consider amending your PATH so that /usr/local/bin
occurs before /usr/bin in your PATH.
I'm having the same problem.
I'm having the same problem. I get this in terminal when I try to run FontForge :
fontforge(18497,0x7fff7d13b180) malloc: *** error for object 0x7faf84068040: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6
searching searching searching for answers but I'm not familiar enough with terminal to even understand what's wrong.
I was having this same issue
I was having this same issue installing on 10.8.2. I removed my previous install and reinstalled fontforge. This time after successfully installing it, the terminal came back with this message:
To use the Python extension with non-homebrew Python, you need to amend your
PYTHONPATH like so:
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
So, I copy pasted that last line, ran it, and now fontforge seems to work fine for me.
After I cleaned up my mess
After I cleaned up my mess from previous installation attempts, this ended up working for me too.
Thank-you. cheers!
Sweet! Glad it worked for
Sweet! Glad it worked for you. Cheers!
You are the man! Thanks
You are the man! Thanks
Hi, Thanks so much for the
Hi,
Thanks so much for the instructions--I have never installed source stuff before and so far it has been a steep learning curve.
When I typed "sudo brew install fontforge" I get an error that says "cowardly refusing to 'sudo brew install' You can use brew with sudo, but only if the brew executable is owned by root. However, this is both not recommended and completely unsupported so do so at your own risk."
Do you know what I should do?
Thanks!
Marisa
I bet you installed homebrew
I bet you installed homebrew as a regular user, which is actually recommended. If that is the case, try dropping sudo from the command, so it is just
brew install fontforge
.Yup--It worked!! Thanks so
Yup--It worked!! Thanks so much for the quick reply!
I have no idea what I'm
I have no idea what I'm doing, but I need to use fontforge. I followed your instructions, but when I open the alias to FontForge, the app "unexpectedly quits." When I run brew doctor, this is the error that comes up:
Warning: /usr/bin occurs before /usr/local/bin
This means that system-provided programs will be used instead of those
provided by Homebrew. The following tools exist at both paths:
git
git-cvsserver
git-receive-pack
git-shell
git-upload-archive
git-upload-pack
gitk
Consider amending your PATH so that /usr/local/bin
occurs before /usr/bin in your PATH.
I don't know what this means or how to fix it (or if it would make anything better if I did fix it....)
When you execute a command in
When you execute a command in your terminal, the actual commands that are used are the first ones found among the series of paths in the PATH environment variable. This variable is set in
~/.profile
. Each path is separated by a colon:
. For example, here is mine:PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/X11/bin
When executing any command, the first place my machine will look is
/usr/local/bin
. If it doesn't find the command there, it will look in/usr/bin
and so on.You should check this file and see if
/usr/bin
is indeed listed before/usr/local/bin
, and if it is, move/usr/local/bin
to the beginning of the line. You will need to log out and back in for the change to take effect.To see if the change has taken effect, type
which git
. If the change has not taken effect, it will say something like/usr/bin/git
. If it has taken effect, it will say something like/usr/local/bin/git
.The reason this makes any difference at all is that homebrew makes all of its stuff available to the system at
/usr/local/bin
.So this should help satisfy brew doctor, but I don't know if it will help fontforge. I hope it does!
I still don't have much of
I still don't have much of any idea how to do this. Could you tell me what to do step by step? Thanks so much for your help so far
You need to learn how to set
You need to learn how to set environment variables on Unix systems (Mac OS X is built on top of BSD Unix). A quick Web search should point you to lots of information in this topic; it's a fairly basic task.
The reason I'm not giving direct instructions is that you can do this in a lot of ways. All are functionally equivalent, but have different advantages and disadvantages. You're better off doing a little research and understanding what those are than typing in commands you don't fully understand, at least for something this simple. :)
Hi David, I haven't installed
Hi David,
I haven't installed anything like this before so your article has been really helpful :)
I followed the steps and so far it all looks successful,but when I type in fontforge in the command line to launch the app there doesn't seem much of a response.
What comes up after typing that in is the following:
Copyright (c) 2000-2012 by George Williams.
Executable based on sources from 14:57 GMT 31-Jul-2012-D.
Library based on sources from 14:57 GMT 31-Jul-2012.
Am I missing a step to make it work?
Ahh seems to work after
Ahh seems to work after uninstalling homebrew and reinstalling it again!
Again, very good walkthrough! :)
Great! I'm glad it works for
Great! I'm glad it works for you now. I was wondering if there was a problem of it not getting set as executable or something, but maybe there was a dependency that didn't get loaded on the first run.
Also, glad the walkthrough was helpful!
I had the same problem as
I had the same problem as mentioned above.
After installing, (and fixing the glib.rb file, and fixing the "export PYTHONPATH...") no app appears anywhere on my computer, (I've tried "brew linkapps" as well as the "ln -a/usr/local..." still nothing) and when I type fontforge into terminal I get this message
Copyright (c) 2000-2012 by George Williams.
Executable based on sources from 14:57 GMT 31-Jul-2012-D.
Library based on sources from 14:57 GMT 31-Jul-2012.
I tried uninstalling homebrew and doing the process all over again, like commented above...same result, no luck. Any ideas on what I could try next?
Hi David! When I follow your
Hi David!
When I follow your guide, I get this error after a line that says "make install" in Terminal:
I don't know what this means.
Help?
When I tried to install
When I tried to install homebrew the first time, I got an Xcode error. So I tried the "sudo" in front, and got the message "Don't run this as root!". So I had to download the command line tools for xcode from Apple's website. It was about 140MB, and took about 5 minutes to install. Just FYI.
The current homebrew formula
The current homebrew formula requires you to install it like this in order to get the GUI:
brew install fontforge --with-x</code.
Sorry, typo. Should be: brew
Sorry, typo. Should be:
brew install fontforge --with-x