Fonts in PDF files

This page provides an overview of the way fonts are supported in PDF files. It covers the basics about the supported font types, encodings and the ways of enclosing fonts in a PDF, by either embedding or subsetting them. How and why to outline fonts is discussed. Some general recommendations about font handling can be found at the bottom of this page.

PDF font basics

The PDF file format supports the use of the following font formats:

  • TrueType
  • Type 1
  • Type 3
  • Composite fonts (Type 0): both Type 1 (CIDFontType0) and TrueType (CIDFontType2) are supported.
  • OpenType: From PDF 1.6 onwards, OpenType fonts can be stored directly in PDF files. In prior releases OpenType fonts are embedded as either Type 1 or TrueType fonts. The ability to embed OpenType directly was added for the forms capabilities of PDF, it offers no immediate advantage  for prepress users.

By preference any fonts that are used in a layout are also included in the PDF file itself. This makes sure that the file can be viewed and printed as it was created by the designer. There are two mechanisms to include fonts in a PDF:

  • Embedding – A full copy of the entire character set of a font is stored in the PDF.
  • Subsetting – Only those characters that are actually used in the lay-out are stored in the PDF. If the “$” character doesn’t appear anywhere in the text, that character is not included in the font. This means that PDF files with subsetted fonts are smaller than PDF files with embedded fonts. For subsetted fonts, the font name is preceded by 6 random characters and a plus sign.

If certain fonts are missing from the PDF file, Adobe Acrobat and Adobe Reader will automatically try to emulate the missing font by using one of the Multiple Master fonts that are built into these programs. This way, the document will not be represented exactly as the designer wanted it to, but at least the text won’t reflow. The Multiple Master fonts that are used for this are:

  • Adobe Serif MM
  • Adobe Sans MM

Another important aspect of font handling is the encoding. This refers to the mapping of a character code to a particular glyph (character shape) description. Each font in a PDF uses a specific type of encoding, either a standard one or a custom one. The following types of encoding are supported by the PDF file format:

  • StandardEncoding
  • WinAnsiEncoding
  • MacRomanEncoding
  • MacExpertEncoding
  • A custom encoding can be used by defining a ‘Differences Array’.

Which fonts are used in a PDF?

There are several ways in which you can get a list of all of the fonts that are used within a PDF file using Adobe Acrobat or Adobe Reader.

  • Adobe Acrobat and Adobe Reader have a Fonts tab in the Document Properties window (File > Properties). Earlier version would only show the fonts from the active page. I do not know if this is still true for newer releases.
  • The preflight engine in recent versions of Adobe Acrobat Professional is capable of providing a more detailed list of all of the fonts that are used in a PDF.
Adobe Acrobat 9 Professional preflight report
Part of an Acrobat 9 Pro preflight report
  • To get an extensive overview of all the fonts used in a document, select Create Inventory in the Options drop-down list of the Acrobat 9 Professional Preflight tool. The Font inventory does not only list all of the fonts but even all the glyphs that are used within the PDF. Below is an example of the level of detail.

Acrobat 9 font inventory
An example of one of the entries in the Acrobat 9 font inventory

Obviously there are other tools that can provide an overview of all fonts, such as for instance the Enfocus PitStop plug-in.

How to embed fonts

Some applications such as Adobe InDesign automatically embed all fonts when pages are exported to PDF.

Acrobat Distiller offers an option to automatically add missing fonts to PostScript files it has to process. In the font locations menu, the user can define several folders that have to be searched for fonts that are missing in the PostScript file. Distiller only needs the printer fonts, it does not need the screen fonts.

Fonts that are not necessarily included in PDF files

Older versions of Adobe Acrobat (Acrobat 3.x and earlier) will never embed the following 14 fonts in a PDF file:

  • Courier, Courier-Bold, Courier-Oblique & Courier-BoldOblique
  • Times-Roman , Times-Bold , Times-Italic & Times-BoldItalic
  • Helvetica, Helvetica-Bold, Helvetica-Oblique & Helvetica-BoldOblique
  • Symbol
  • ZapfDingbats.

These fonts, excluding ZapfDingbats, are called the Base 13 fonts.

From Acrobat 4.x onwards, there is no problem embedding the above 14 fonts. In fact it is a good idea to actually always embed these fonts as well. Instead we got another restriction: if the licensing policy of a TrueType forbids the font to be included in a file, Distiller 4 and later will respect this restriction and will not embed the font.

How to subset fonts

It is possible to only include those characters of a font that are actually used in the publication. This technique is called ‘font subsetting’.

Usually you can specify that font subsetting needs to be used as soon as a certain percentage of the character set of a font is used. Below is the option that is shown in Adobe InDesign CS4. A similar ‘Subset fonts below XX %’ parameter is available in Acrobat Distiller.

Font subsetting option in InDesign

Font subsetting in Adobe InDesign

There are 2 advantages to subsetting fonts:

  • It reduces the size of a PDF file and can be handy if file size is really crucial, for instance for PDF files that will be downloaded from the web.
  • RIPs will always use a subsetted font, even if the full font is already available on the RIP. This way text reflows caused by differences between fonts can be avoided.

There are two disadvantages to subsetting fonts:

  • If you want to edit text in certain PDF editing tools and the character you need is not included in the subset, it cannot be used in the correction. Acrobat itself does not suffer from this. It only uses the system fonts for editing.
  • Merging two files that contain a different subset of the same font can lead to missing or swapped characters. Older PDF applications can suffer from this. Most of these bugs have been fixed in more recent versions.

How to outline fonts

Sometimes it can be practical to convert all fonts within a PDF to outlines. This way the text in the PDF is ‘locked down’ and will not be output differently by a RIP because of some weird font behavior. You should be aware that outlining fonts affects the quality of the type: at smaller type sizes the output quality will be slightly inferior (because font hinting is gone) and small type may also fatten up a little.

There is an option to outline all text in the Advanced > Print Production > Flattener Preview option in Acrobat 8 Professional. This will only outline text on pages that have transparency in them so the trick is to add a transparent object to each page (either using a watermark or using PitStop Professional). You can find a discussion and sample screen shots about this trick in this thread.

How to extract fonts from a PDF

You actually cannot extract a font from a PDF, not even if the font is fully embedded. There are two reasons why this is not feasible:

  • Most fonts are copyrighted, making it illegal to use an extractor.
  • When a font is embedded in a PDF, not all of the font data are included. Obviously the font outline data are included as well as the font width tables. Other information, such as data about ligatures, are irrelevant within the PDF so those data do not get enclosed in a PDF.

I am not aware of any font extraction tools but if you come across one, the above reasons should make it clear that these utilities are to be avoided.

General recommendations

In order to minimize surprises with fonts in PDF, try following these guidelines:

  • Always set Distiller to error out when a font is missing.
  • Always embed all fonts.
  • Always embed complete fonts, do not subset fonts. This avoids rare problems when for example putting several pages using the same font in different subsets onto the same plate.
  • Always turn off ‘Use local fonts in Acrobat’ on every machine in your shop.
  • Always do a preflight for occurrences of Courier in PDF files you process or send away or receive (in case a font has been substituted)
  • Try to avoid using the TouchUp text edit tool in Acrobat.
  • Remove all fonts from your RIP (except Courier, Helvetica or any other font that your RIP may absolutely require to operate correctly).
  • Use only Adobe PostScript 3 or Harlequin based RIPs or output devices. There are some RIPs/output devices around that have problems handling certain font stuff (e.g. CID fonts as in PDFs produced by InDesign).
8 August 2013

54 Responses to “Fonts in PDF files”

  1. Yuri says:

    Thanks for the outlining in PDF hint. Have been looking for that for a while. Work in Acrobat 7 too it turns out.

    • breyshell says:

      Acrobat is not only choice for us to change font in pdf file, there is a software name infix pdf editor can take charge of it very well.

      http://www.convertpdf.org/change-font-in-pdf.html

      By using it, you can edit pdf text as you do in word document, replace text, change font type, size and even color. And the most gratified feature is that when you replace text in it, the font type of new text you added will be the same as text around it.

  2. Subhash says:

    Hi,

    This article gives very useful information. Thanks.

    But I need some detailed information about how acrobat reader processes marathi ( devanagari ) font from Mangal.ttf. actual problem is I am building a demo web application using Java technology. Marathi data is entered database and retrieved back and shown correctly on HTML web pages but when a pdf report is generated, it misspells some half spelled chars like – शिवगंगा महाराष्ट्र are spelled as शविगंगा महाराष्‍ट्‍र ( I have typed it explicitly, actually when I tried to copy from pdf and paste, it pastes correctly in HTML text area / text box like शिवगंगा महाराष्ट्र ).

    Can anyone expert / experienced programmer guide me please regarding which font / pdfFont, encoding and other parameters I should specify while building pdf.

    Thanks in advance,
    Subhash

  3. Vicki Trzeciak says:

    We are looking for an Arial Font that is Type 1 postscript with .AFM and .PFB file versions that are embedded and editable. Do you know where I can purchase this font?

  4. prashant says:

    i have pdf containing devnagari texts.
    fonts are embeded in pdf document
    when i copy these texts from pdf an pest in other application any fonts are not matched.

    • Laurens says:

      Font encoding seems to be a major issue with Indian Language fonts. Because of the wide range of Devnagari font formats, copying and pasting text seems to be a hit and miss affair. I have no experience with this but possibly a tool such as the one that can be found at http://www.fontsuvidha.com is a solution.

  5. Daniyel says:

    Thank you for this discussion. Can anyone speak to the issue of saving/printing/exporting pdf files from Illustrator, and indesign with regard to embedding/subsetting fonts? I see many students producing their pdfs in many ways, and I get various results. Sometimes the pdfs are still asking for fonts… illustrator and indesign do not have explicit places to specify how fonts are handled when generating pdfs. thank you for your time.

  6. himanshu says:

    please confirm:
    can we copy fonts from 1 pdf to make another PDF to publish online? Do fonts are copyrighted?
    for example can we use fonts of article pdf on http://www.sciencedirect.com in designing our own pdf files.

    • Laurens says:

      Most fonts are indeed copyrighted although there are large libraries of free fonts available on the web.

      Extracting fonts from a PDF to use them for other projects isn’t only illegal but also very difficult to do (if not impossible). In most PDF files, just a subset of fonts is embedded. Only those characters that are used in the text are also embedded in the PDF. Even if you could extract such a font, you would only have an incomplete typeface with many characters missing.

  7. RajeshVoruganti says:

    Hi All
    I am using iText 5.0 to generate the PDF file using java technology.but i got problem with when we have print that pdf file which is generate from iText.In that PDF file text not getting actual PDF file in ThermalPrint Printer i am using Zebra LP2844

    Let me know if u have this overcome this problem

    Please suggest me u r answer

    Thank You
    Rajesh Voruganti.

  8. rakesh says:

    hi..
    gm …

    I am working with java tech,and i want to display report in pdf format.i want to use Devnagari font(marathi)in report.i have one font “KF_kiran”for devnagari script.but could not display report in this font.plz give me the solution.

    Thanks,

    • sam says:

      This is just joke that you want report in marathi
      but tell me that can i show marathi pdf content in excel
      give me this answer buddy

  9. Jamie says:

    Hi
    I am creating a document for publishing in indesign. I use the character š continuously in the 300 page document. When I export as a pdf sometimes this appears but most often is replaced by an empty rectangle. Would anyone be able to suggest what I am doing wrong or how it is possible to rectify this.
    Many Thanks

  10. sab says:

    hi
    I am creating an data table in the sql server 2005. i have one pdf file in that all data is in marathi format using CDAC-GISTSurekh font i want to transfer that data into Excel then i will sent to server but there is an problem of font mismatching even i have CDAC-GISTSurekh font .
    Can Help Me how to i this.

  11. Jimmy says:

    It’s useful, but how can I embed a Type1 font programmatically?

  12. Tina says:

    Quite useful, thank you for the knowledge.

  13. Bongi says:

    hi i don’t really like fonts at all but thanks for the knowledge

  14. Tyler Tolman says:

    Thanks so much! This helped a ton!

  15. batool says:

    I want to upload a paper in Edas but do not accept the pdf with this error. one of fonts not embedded in file but all font of my file is times roman that is embedded. how to resolve this error?please help me

    • Laurens says:

      There are a number of reasons why a PDF might refer to a font which you think isn’t used in the original document:

        - The font might be used in an illustration, advert or other page element which was inserted on a page.
        - There may be a space or other small character such as a dot that accidentally uses an incorrect typeface. A visual check will not reveal this and you will need to doublecheck all the text properties.
        - Outside of the page in the bleed area there may be elements, such as the crop marks and the document name, which the layout application add. Some designers temporarily put bits of text or logos in the paste board area and afterwards forget to clean this up. Check the pasteboard area as well as the print or export settings.

      If the above tips don’t help to get rid of the unwanted font, try using a tool like PitStop to delete any elements containing the unwanted font.

  16. ankur says:

    can we edit anything written in pdf file,
    if so how?

  17. I’m trying to upload a pdf into my lulu ebook store and it’s not being accepted because the fonts are not embedded.

    Can I fix this? I did not create the pdf.

  18. 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!

  19. Curtis says:

    yeah, this article was no help at all. All it told me was that the font i’m trying to use is Base 13. Thanks a lot.

  20. Goyo says:

    I tried to make pdf documents from musicscore but musical symbols do not appear.

  21. Martin Willcocks says:

    I have two files created by GVox MusicTime 4.0.2 and printed to pdf using Sourceforge PDF writer, both generated in the same computer with the same programs, but when I try to merge them using Acrobat 5.0 I get the error message and the documents are not merged.
    Each file is a previously merged set of files using Acrobat 5. T

  22. Martin Willcocks says:

    There doesn’t seem to be a way to define what characters are not present in each document’s subset nor a way to include them without adding extraneous material that might contain the missing characters. Any ideas on how to force them to be merged into a single document. I’m baffled by the geek talk, just want a solution please.

  23. This is a great summary of how to embed fonts. Pretty much all the info I needed. Thank you for taking the time to detail everything.

  24. sudarshan says:

    i m using the ARIALUNI font and identity-H pdf encoding to generate marathi text pdf report but it’s not showing marathi text and giving error. could nt load font ARIALUNI.TTF. I tried to do it by installing shivaji01, marathi-lekhani bt its nt working.
    Can anyone show me right direction…

    THANKs in advance

  25. Arun Segar says:

    Is there anyone help me, how to select and remove a font from PDF. Actually Pitstop is doing it. However, I want to do it in a single shot because I have more PDF to do it. Is there anyone help me.

  26. Tasha says:

    Can you turn a pdf into a usable PDF with fonts.

    • Laurens says:

      You’ll have to define what you mean by ‘pdf’ and ‘usable pdf with fonts’. Without more specific information nobody can answer your question.

  27. Arun Segar says:

    Hi,

    PDF’s are already build using variety of fonts. Here I have to choose a font and remove it from the PDF.

    Eg.,

    Suppose the PDF document is having the Time-Bold, Times-BoldItalic, Times-Italic, Times-Roman fonts. In this case, here I want to remove the Times-Italic font only from the PDF.

    This option is available in the “Enfocus Pitstop” software. By Using this software, at a time we can remove the font in single PDF only and not in a single shot for more no. of PDF.

    Is there any other option to remove the font from already build PDFs in a single shot for more PDFs.

    Your help in this regard is greatly appreciated.

    Thanks,
    Arun Segar

  28. Machiel says:

    Hi,

    I´m trying to change a font in a pdf document using the touch up tool.
    Normally i can choose my font of choice but now i get an error that says the chosen font and the fontcodings are different so the font cannot be changed.

    Anybody know a workaround?

    Thnx in advance!

  29. Tyler says:

    This didn’t help. Simple question: How do you embed a font into a .pdf so the user you’re sending it to can access it?

    • Peter says:

      It depends. If a pdf file has been created from a postscript file (print to file) you’re stuffed. If your publishing program has a pdf output preset menu, it should allow you to turn on the “embed fonts” function. If you have an existing pdf you can use the program Pitstop to embed the fonts (Global change, Font, Embed fonts).

  30. Peter says:

    Hi, I’ve created a pdf form but cannot allocate a specific font to the text fields because the font license wont allow me to embed it. The fonts are laegally bought. Is there a way around this?
    Thanks.

  31. Edowardo says:

    Hi, nice post do you have. thanks for sharing.
    btw, can you tell me what kind of font do you use here in your site?

  32. Shaqui says:

    We have just had a client come in with a PDF and a TTF font, and she said we should be able to ‘import’ the font into the PDF (which uses it, but the properties say it is not embedded). However, I have never come across this before – a PDF is a PDF (although I am aware Macs & PCs will display & print them differently at times, apparently). Has anyone else encountered this ability?

  33. Leslei says:

    Definitely coming back to read more. I use the edit object tool, hiselect a whole page or just the parts I want to edit, right click>edit object (I’ve already set up Illustrator in the preferences)and Illustrator opens automatically with my selected stuff>edit it in Illustrator, save and it is automatically saved into the pdf, close Illustrator and the changes have been saved in the pdf. If you edit the whole page, you can do a save as an Illustrator file. Do a Find Font and replace the missing fonts with fonts on your system. Love it!

  34. Uday says:

    I am converting html text to PDF from coldfusion programming language.

    I do not want to attach Type 1 font. I want to embed font which is used in html text but it attach some default font.
    These fonts are attached by default.
    * Courier, Courier-Bold, Courier-Oblique & Courier-BoldOblique
    * Times-Roman , Times-Bold , Times-Italic & Times-BoldItalic
    * Helvetica, Helvetica-Bold, Helvetica-Oblique & Helvetica-BoldOblique
    * Symbol
    * ZapfDingbats.

    I delete all type 1 font from my system then it attached
    * Adobe Serif MM
    * Adobe Sans MM

    Is there any way to exclude type 1 and embed font not attach.

    Thanks in advance

  35. Henry says:

    hi i’m Henry, i have doc file from ms.word 2007 then i save to pdf acrobat x, when i print it there are many font missing,my question is how to know in pdf program thats file is missing or no,so i can check before i print it,thanks send me by email…….

  36. Josh says:

    Hello, I’m a yearbook adviser and I’ve run across a minor problem that I should have an answer for but I don’t. Maybe someone can help me (or maybe this is the wrong forum). I am trying to export from InDesign CS4 a font titled “A bite.” When I attempt to export to PDF, I receive the following message and the font–a bite–is replaced.

    “A bite: This font could not be embedded due to licensing restrictions in the font. A substitute font will be used if it supports the glyphs used in the restricted font. The PDF will not be created if the glyphs cannot be represented.”

    Help?

  37. Rick says:

    Check the list of fonts in the resulting PDF (Open in Acrobat Reader then File->Properties->Fonts). If “A Bite” is listed and that font is installed on the computer which is viewing the PDF you are all good. If “A Bite” is not available on the computer which is viewing the PDF you will get a font-substitution which is not what you want.

    I’m not sure what you can do if “A Bite” is not listed in the list of fonts except ask in the CS4 forums.

  38. gaurav satpute says:

    hi
    ,i have one application in which i used one pdfjet.dll in which i used Unicode Hindi characters like रिकॉर्ड but when pdf is generated that time rendering of that hindi word is not correct ,plz help me
    thanks in advance


Advertising