1. 4FipS.com
  2. Photos
  3. Videos
  4. Code
  5. Forums
  6. pfQuizzz
  7. About

4FipS.com Forums

Forums dedicated to the projects hosted at 4FipS.com

Skip to content

FontForge binaries for Windows and OSX

> About coding, hacking, photography, and such...

FontForge binaries for Windows and OSX

Postby FipS on Thu Mar 01, 2012 4:46 pm

I've been recently doing some batch processing of TrueType fonts and came across FontForge, which is a really nice font editor with powerful scripting possibilities, exactly the kind of program one needs.

It's all great except one thing: FontForge is distributed in the form of source code. It's too bad for a spoilt Windows user like me :) so I've started looking for binaries.

For Windows it's quite simple, here's an unofficial self-contained package ready for use!

For OSX the situation is much tougher, you need either to build it yourself or get pre-build binaries somewhere (I got mine using MacPorts). If your goal is the same as mine to have a self-contained package that is easy to copy between multiple computers (e.g as a part of shared environment), the joy doesn't end here as the main FontForge executable refers its dynamic modules using absolute paths, which brings a lot of inconvenient dependencies.

So I've decided to break these dependencies step by step:

1) Here's a list of binaries to deal with (copy them to the same dir):
Code: Select all
fontforge
libICE.6.dylib
libSM.6.dylib
libX11.6.dylib
libXau.6.dylib
libXdmcp.6.dylib
libXext.6.dylib
libXi.6.dylib
libXt.6.dylib
libfontforge.1.dylib
libgdraw.4.dylib
libgunicode.3.dylib
libgutils.1.dylib
libiconv.2.dylib
libintl.8.dylib
libxcb.1.dylib
libxkbfile.1.dylib
libxkbui.1.dylib

2) Get a list of modules referred by FontForge by typing this:
Code: Select all
otool -L fontforge

Output:
Code: Select all
fontforge:
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 44.0.0)
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 152.0.0)
/opt/local/lib/libfontforge.1.dylib (compatibility version 2.0.0, current version 2.0.0)
/opt/local/lib/libgdraw.4.dylib (compatibility version 5.0.0, current version 5.10.0)
/opt/local/lib/libgutils.1.dylib (compatibility version 2.0.0, current version 2.3.0)
/opt/local/lib/libgunicode.3.dylib (compatibility version 4.0.0, current version 4.2.0)
/opt/local/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.1.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)
/opt/local/lib/libXi.6.dylib (compatibility version 8.0.0, current version 8.0.0)
/opt/local/lib/libXext.6.dylib (compatibility version 11.0.0, current version 11.0.0)
/opt/local/lib/libxkbui.1.dylib (compatibility version 2.0.0, current version 2.0.0)
/opt/local/lib/libXt.6.dylib (compatibility version 7.0.0, current version 7.0.0)
/opt/local/lib/libSM.6.dylib (compatibility version 7.0.0, current version 7.1.0)
/opt/local/lib/libICE.6.dylib (compatibility version 10.0.0, current version 10.0.0)
/opt/local/lib/libxkbfile.1.dylib (compatibility version 2.0.0, current version 2.2.0)
/opt/local/lib/libX11.6.dylib (compatibility version 10.0.0, current version 10.0.0)
/opt/local/lib/libxcb.1.dylib (compatibility version 3.0.0, current version 3.0.0)
/opt/local/lib/libXau.6.dylib (compatibility version 7.0.0, current version 7.0.0)
/opt/local/lib/libXdmcp.6.dylib (compatibility version 7.0.0, current version 7.0.0)
/opt/local/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.1.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 550.43.0)

3) Get rid of all the inconvenient '/opt/local/lib/' by typing this:
Code: Select all
install_name_tool -change /opt/local/lib/libintl.8.dylib @executable_path/libintl.8.dylib fontforge

Output after 'otool -L fontforge':
Code: Select all
fontforge:
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 44.0.0)
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 152.0.0)
@executable_path/libfontforge.1.dylib (compatibility version 2.0.0, current version 2.0.0)
@executable_path/libgdraw.4.dylib (compatibility version 5.0.0, current version 5.10.0)
@executable_path/libgutils.1.dylib (compatibility version 2.0.0, current version 2.3.0)
@executable_path/libgunicode.3.dylib (compatibility version 4.0.0, current version 4.2.0)
@executable_path/libintl.8.dylib (compatibility version 10.0.0, current version 10.1.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)
@executable_path/libXi.6.dylib (compatibility version 8.0.0, current version 8.0.0)
@executable_path/libXext.6.dylib (compatibility version 11.0.0, current version 11.0.0)
@executable_path/libxkbui.1.dylib (compatibility version 2.0.0, current version 2.0.0)
@executable_path/libXt.6.dylib (compatibility version 7.0.0, current version 7.0.0)
@executable_path/libSM.6.dylib (compatibility version 7.0.0, current version 7.1.0)
@executable_path/libICE.6.dylib (compatibility version 10.0.0, current version 10.0.0)
@executable_path/libxkbfile.1.dylib (compatibility version 2.0.0, current version 2.2.0)
@executable_path/libX11.6.dylib (compatibility version 10.0.0, current version 10.0.0)
@executable_path/libxcb.1.dylib (compatibility version 3.0.0, current version 3.0.0)
@executable_path/libXau.6.dylib (compatibility version 7.0.0, current version 7.0.0)
@executable_path/libXdmcp.6.dylib (compatibility version 7.0.0, current version 7.0.0)
@executable_path/libiconv.2.dylib (compatibility version 8.0.0, current version 8.1.0)
* now the FontForge itself has been fixed

4) Repeat the steps above for each dylib:
Code: Select all
otool -L libintl.8.dylib

libintl.8.dylib:
/opt/local/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.1.0)
/opt/local/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.1)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 550.42.0)

Code: Select all
install_name_tool -id @executable_path/libintl.8.dylib libintl.8.dylib
install_name_tool -change /opt/local/lib/libiconv.2.dylib @executable_path/libiconv.2.dylib libintl.8.dylib

libintl.8.dylib:
@executable_path/libintl.8.dylib (compatibility version 10.0.0, current version 10.1.0)
@executable_path/libiconv.2.dylib (compatibility version 8.0.0, current version 8.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.1)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 550.42.0)

It's a tedious job, but after a while you've got a nice self-contained FontForge package for OSX!
User avatar
FipS
Site Admin
 
Posts: 144
Joined: Wed Nov 12, 2008 9:49 pm
Location: Prague

FontForge binaries for Windows and OSX

Sponsor

Sponsor
 

Return to 4FipS.com General Discussion & Blog

Who is online

Users browsing this forum: Majestic-12 [Bot] and 1 guest

cron