vote up 1 vote down star
1

Is there a way to extract fonts from pdf files? I know that usually embedded fonts in pdf files are only subsets of the fonts. Anyway is there way to do this?

flag
Unless you are asking how to do this programmatically, this is not a programming question. – Peter Hilton Jan 8 '09 at 1:25

migrated from stackoverflow.com

6 Answers

vote up 5 vote down

Modified version for Windows Users

Original Version : http://init.sh/?p=13

Download FontForge for Windows

http://www.geocities.jp/meir000/fontforge/fontforge-mingw_2009_03_05.zip

Once FontForge is downloaded, start it

On the “Open Font” screen, go down to where it says “Filter” and change it to “Extract from PDF”. Select your PDF and a “Pick a font” window will open. Select the font you want to extract and click OK.

A window with a display of the font will show up. It’s not quite ready to turn into a TTF yet. Here’s how to prepare it:

Go to the Encoding menu and select “Compact”. This will cause FontForge to remove all characters that are not defined in the embedded font. Beware though, sometimes when a font is embedded into a PDF it will only contain characters used. So, if the PDF file that you are trying to extract from does not contain the letter “P”, then that letter will not show up in FontForge. Check to make sure all the characters you need are displayed and then head over to the Element menu.

Click on Font Info. You can update the Fontname, Family Name, and most importantly, “Name for Humans”. This field is what the font will display as in your editing program. The font name is usually a little garbled when you extract it, so just make it something readable. If there is a copyright notice displayed at the bottom, you should probablly stop what you are doing since that usually means the font should be purchased.

If there’s no copyright, click on “OK”. Then go to File > Generate Fonts.

Select the type of font you want to save as (Usually TrueType is best), and click on Save. You may encounter some messages about Non-standard Em size and Bad Private Dictionary errors. Just click on Save and you should be OK.

Then, find your font file and open it up to make sure that it displays properly.

If it does, then all is well. Close FontForge and enjoy your properly displayed font.

link|flag
vote up 1 vote down

Though bear in mind: Some documents with custom fonts are made as PDFs just for the purpose that those fonts should not be available to everybody.

Meaning they are copyrighted to their respective owner. Which in turn means if you plan to use said copyrighted font you can get in a lot of trouble.

Yes, not every font is free. There are fonts that cost hundreds of buck too.

link|flag
vote up 0 vote down

I have used fontforge to accomplish this in the past.

link|flag
vote up 0 vote down

The download link isn't working, any alternate mirrors?

link|flag
vote up 0 vote down

This is simply amazing. Thanks for putting this post up. I think your link is messed up, but here's a new one for you.

http://www.geocities.jp/meir000/fontforge/fontforge-mingw_2009_06_24.zip

This works like a charm!

link|flag
should be a comment – Redandwhite Nov 26 at 21:46
vote up 0 vote down

link isn't working!

link|flag

Your Answer

Get an OpenID
or
never shown

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