Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have a font set - Type: Font Suitcase

I am sure I have used a terminal command to convert it to a TTF or OTF. I don't really want to pay for software to do so. What is the best way of converting these types of font?

share|improve this question

3 Answers 3

Font Suitcases can also contain PostScript Type 1 outline fonts. The current highest voted answer above does not mention this. And the solution proposed there does not work for these types of suitcases.

Here is a screenshot of what a Type 1 suitcase looks like in OS X:

screenshot of PostScript Type 1 outline font suitcase

The steps for converting these to OpenType OTF are:

In a Terminal window, open the folder that contains the fonts to convert. Ideally you should have a folder that contains no other files than the suitcase and its parts (see screenshot above for example).

Repeat the following command for each PostScript Type 1 font file, skipping the font suitcase file:

cat "XXXXXXXXXX/..namedfork/rsrc" > ~/"Downloads/XXXXXXXXXX.dfont"

...replacing XXXXXXXXXX (twice in the above command) with the name of the respective file.

For example:

cat "BerkeBla/..namedfork/rsrc" > ~/"Downloads/BerkeBla.dfont"

This will save out a .dfont copy of your font to your ~/Downloads folder.

Next, use the application DfontSplitter to convert the .dfont files to .pfb files. Download the app from http://peter.upfold.org.uk/projects/dfontsplitter ... then open it, select all .dfont files by dragging them into the window, choose a destination folder, and click the Convert button.

Next, go to http://www.freefontconverter.com/ and upload your .pfb files, one at a time, and specify that you want to convert to OTF OpenType format. This will download an OpenType version of your font.

Note: This method strips the kerning pair data from the font. I am still researching a better method that will preserve that data. I also tried the commercial TransType 4 (trial version), and it had the same output problem: no kerning pairs. It may be that TransType 4 is based on Fondu, as is DfontSplitter, so both suffer from the same limitation.

share|improve this answer

Try Fondu:

A set of programs to interconvert between mac font formats and pfb, ttf, otf and bdf files on unix. Fondu will read a series of mac files, check their resource forks and extract all font related items into seperate files.

share|improve this answer

Font Suitcases can potentially hold 2 different kinds of fonts: bitmap fonts and TrueType fonts. Normally, font suitcases that hold bitmap font data are only one half of the font; to be usable you need to have the additional PostScript Outline font files (these will have an LWFN icon).

Otherwise, the font suitcase can represent a TrueType font, which compared to a "PostScript Type 1 Font Suitcase", is truly self-contained.

I'm not aware of command-line font converters for the Mac. The only type of conversion I could imagine using command line tools would be converting from a resource-fork-based Font Suitcase to a Datafork TrueType font (.dfont), and possibly from a Mac TrueType to a Windows TrueType font (basically you'd need to extract the 'sfnt' resource entries).

To try to figure out if the Mac Font Suitcase is a TrueType font, you can use the following command:

grep -c sfnt /Library/Fonts/BankGothic/..namedfork/rsrc

What this does is return the number of times 'sfnt' is found in the resource fork of the file in question. If this returns 0, the file is most likely not a TrueType font.

Note that by default, terminal command will only act on the data fork part of files. For example:

ls -la /Library/Fonts/BankGothic
-rw-rw-r--@ 1 root  admin  0 Mar  7  2007 /Library/Fonts/BankGothic

This shows that the file is empty (has a file size of 0). To specifically target the resource fork, you append /..namedfork/rsrc to the filename as in the following example:

ls -la /Library/Fonts/BankGothic/..namedfork/rsrc
-rw-rw-r--  1 root  admin  346937 Mar  7  2007 /Library/Fonts/BankGothic/..namedfork/rsrc

EDIT: If it is a Mac TrueType font, I can convert it to one or more Windows TrueType fonts (.ttf) for you. (For this particular type of conversion, there's no need to use font software; a simple Mac resource editor (and knowledge of this process) should be sufficient. If I do convert it in this manner, I'll provide screenshots of what I'm doing for the record).

EDIT 2: See my answer on StackOverflow for "Using OS 9 resource fork fonts with CSS" for a tool I wrote that would allow drag and drop extracting of sfnt resource entries to individual ttf font files.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.