Extract fonts from PDF files using FontForge

FontForge showing an font extracted from a PDF fileI have many times tried to find a way of extracting fonts used in different PDF files, but the solution I’ve found before always involves first converting the PDF file to a PS (PostScript) file, and then manually extracting those fonts and making them into PostScript font (.pfb and .pfa) files, this was a cumbersome process that I never got to work. But yesterday I found a much easier way to extract the fonts using FontForge’s built in “Extract from PDF” feature, wich I read about in this article: [HOWTO] Extract Fonts from a PDF File.
FontForge showing the Open Font dialog
Basically you just need to select “Extract from PDF” in the filter section of the “Open Font” dialogbox used when opening files. When you have selected your PDF file, a “Pick a font” dialogbox will open where you could select wich font to open. Then you’ll just need to compact the font using the “Encoding” menu and selecting “Compact”. This will remove all non-used glyphs in the font. Then you would have to edit the Font Info, and save the font as a font file (usally TrueType is best). Quote from the article: “Beware though, sometimes when a font is embedded into a PDF it will only contain [glyphs for] characters used. So, if the PDF file that you are trying to extract from does not contain the letter “P” [glyph], then that letter will not show up in FontForge.” (You could see an example of this in the image above, the PDF file the font was extracted from did not contain glyphs for all the letters in the english alphabet).

4 thoughts on “Extract fonts from PDF files using FontForge

  1. Very interesting method you have presented here. I am a graphic designer and I work mainly for auto industry. They use special fonts for every icon in the car. I had this problem a few months ago. At that time it was very little information about this subject online. After a lot of researching I have developed a procedure to extract any type of font embedded in any pdf file. I will present my method on my blog on http://pdffontextract.blogspot… so people can use it and solve their problems. Glad to help you guys!

  2. A few years ago I have designed a special font. It took me about a year of on and off work. One day my Maxtor HDD died and there was no way I could recover my work. But I had the font embedded in some PDF files for my clients. Then I have the the ideea to extract fonts from these files. After a year or so of looking online for an answer I put together a method to extract fonts from PDF. I have presented this method on my blog at http://pdffontextract.blogspot.com . Since I have come up with this solution many alternetives emerged but there nothing wrong with diversity. I made this post to help other that need to recover their lost work. Have fun and if you need any help don’t hesitate to contact me.

  3. Great! I didn’t know about that online service.
    I’ll test that site, and update my article.

Leave a Reply

Your email address will not be published.