Converting pfb to mac fonts

cm983
24.Sep.2007 5.00pm
cm983's picture

I downloaded fontforge and x11 and am trying to convert the font using this system
the problem is when i choose the font it does not allow me to choose a output font type

any suggestions on how i can do this. (convert pc fonts to mac )

Thanks

c

I will assume that all you need is a font you can install on your Mac with "Font Book". You won't need X-windows or fontforge's graphic interface. I will also assume you installed fontforge directly from sourceforge.net. I will finally assume your shell is bash and that you don't know how to fix your Unix environment (I don't want to explain).

Now, do this: put all the *.afm and *.pfb (or *.AMF and *.PFB) files of the fonts you want to convert in the same directory. In that same directory, you will put two executable files, one named convert, the other named pfb2otf and call convert on all your font files. Here is a trick to do all that: in a terminal window you cd to the directory containing your font files; once you are there (when the Unix command ls lists your font files), you just paste in the terminal window (in one shot) the 18 lines between the dotted lines:

-----------
cat > convert << 'EOF'
#!/bin/bash

PATH=/usr/local/bin:$PATH
FONTFORGE_LANGUAGE=ff
export PATH FONTFORGE_LANGUAGE

if (test -f $1); then ./pfb2otf $1; fi
EOF
cat > pfb2otf << 'EOF'
#!/usr/local/bin/fontforge
Open($1);
Reencode("unicode");
Generate($fontname+".otf");
Quit(0);
EOF
chmod 755 pfb2otf convert
for i in *.[pP][fF][bB]; do ./convert $i; done
-----------

If everything went ok, you should see

Copyright (c) 2000-2007 by George Williams.
Executable based on sources from 17:57 15-Sep-2007.

as many times as you have font files. When the processing is over, you start "Font Book" click on "File > Validate File..." and select the fonts you just generated (you can use Apple A to select them all). If the validation succeeds, your fonts should be ok to install.

Michel
PS Edited after posting


What is above should work on any Unix machine. For the Macintosh, I wrote a small application that does it by just double clicking and selecting the folder containing the fonts to convert. Look at the thread http://typophile.com/node/37659

Michel


Ecouragement: the first method does really work and you get it done within mere minutes – if you are familiar with the Terminal and Sourceforge.

I'm sure that application mentioned in the second post will be a smoother way for anyone who does not regard his Mac OS as essentially a shiny Unix derivate (which, of course, it is). Just ignore the helpful hacker's arrogance there.

Er, yeah, thanks Michel. This helped me a lot. Really.