Extracting True Type Fonts from Font Suitcase files
[tweetmeme source=”neoRiley” only_single=false]If you’re using Unity on a Mac, you’ve undoubtedly had to import Fonts for use within your application. Normally, you would design in Fireworks/Photoshop first, then translated that design to Unity. After I’ve settled on what fonts I want to use, I open up Font Book and locate the fonts location on my HDD. Of course, there are plenty of fonts that are stored in a “Font Suitcase” type of container, and as you’ve seen – Unity can’t use them.
The nice thing is, there is a tool to extract (probably several tools) the TTF files stored in Font Suitcases. This particular one is called Fondu.
- Once you’ve downloaded it, extract it.
- Open terminal
- Change directory to the dir that you extracted fondu in
- type: ./configure
- type: make
- type: make install
This will install fondu and configure it to run.
To get your TTF, use terminal and type:
fondu [pathToYourFontSuitcaseFile]
Example:
fondu /Users/NeoRiley\ 1/Documents/RockonFlash/iPhone/Bombs\ Away/production/fonts/Eurostile
Ding. Done. Now you have whatever TTF files you need for Unity (or whatever use you might have for them)
Have a Bandit day!
Hey John~ Great site! Good luck.
I tried this out and got an error “Can’t find an appropriate resource fork in …”
I read about viewing resource forks in another blog and used the following to extract from my provided font suitcase.
fondu “TheFontName”/..namedfork/rsrc
that worked 100%
Same problem as Kent – but unfortunately his solution isn’t working for me…. so far.
Terminal says “Can’t find an appropriate resource fork in ..namedfork/rsrc”
try just the ..namedfork part:
$ fondu “TheFontName”/..namedfork
Also, you can apply this patch to fondu.c if you want to be able to leave the ..namedfork part off and just use the name of the font.
— fondu.c 2005-10-10 18:15:41.000000000 -0400
+++ fondu.c.blc 2011-10-08 20:03:40.000000000 -0400
@@ -940,12 +940,12 @@
#ifndef OldMacintosh
/* OS/X and linux with appropriate drivers */
static int HasResourceFork(char *filename,PSFONT *psfont) {
– char *respath = malloc(strlen(filename)+strlen(“/rsrc”)+1);
+ char *respath = malloc(strlen(filename)+strlen(“/..namedfork/rsrc”)+1);
FILE *temp;
int ret=false;
strcpy(respath,filename);
– strcat(respath,”/rsrc”);
+ strcat(respath,”/..namedfork/rsrc”);
temp = fopen(respath,”r”);
free(respath);
if ( temp!=NULL ) {