An Introduction to PDF Font Technologies

PDF Font Technologies

The thing which makes PDF fonts so confusing for many people is the number of different font technologies which can be used in a PDF file. The PDF file specification has been around for 16 years and in that time a number of different font technologies have appeared (as much for ‘business’ as technological reasons). So this article will briefly explain some of the main font technologies you can use with PDF files.

Adobe was one of the pioneers of producing high quality fonts for electronic publishing. Until they invented Postscript, most fonts were bit mapped images which had to be specially created for different font sizes. With Postscript, Fonts could be defined as graceful lines and curves with detailed instructions about how to behave as certain sizes (so if you drew the letters at a tiny size, thin lines which made up critical parts of the letter would not disappear).

Adobe had two original font types – Type 3 and Type 1 fonts. Type 3 does not have all the clever features of Type 1 and generally produces less than perfect results, but Type 1 works very well and was very successful. Type 1 fonts work with Adobe Font manager and usually have .afb or .afm endings. There is also a variation of Type1 called CFF (Compact Font Format).

When Microsoft decided to add proper font support to Windows, they did not want to adopt this solution (possibly to avoid paying royalties to Adobe), so they developed another font technology with Apple called TrueType. This used the same idea of defining fonts as a set of shapes, but is totally incompatible with Type1. These fonts are what you generally find in the fonts directory if you use Windows (they had the ending .ttf).

TrueType and Type1 are comparable – they do essentially the same thing in different ways and both have advantages and disadvantages – Type1 arguably uses a superior method for defining curves while Truetype offers better CMAP capabilities – but either of them work fine for most users. Indeed the latest file format (OpenType) takes features from both TypeType and Type1 and is a result of improved relations with Adobe and Microsoft.

Because the PDF file format is backward compatible it supports all of these types of fonts. So font advice should be to avoid Type3 and stick to Type1, TrueType or OpenType, depending on what fonts you have access to. You just need to understand that they are all different, incompatible implementations of the same idea of defining characters as a set of shapes with rules to ensure good quality at all sizes.

If you embed the fonts, you can generally ignore the font types and leave the PDF viewer to handle them.

This post is part of our “Understanding the PDF File Format” series. In each article, we aim to take a specific PDF feature and explain it in simple terms. If you wish to learn more about PDF, we have 13 years worth of PDF knowledge and tips, so click here to visit our series index!

Related Posts:

The following two tabs change content below.

Mark Stephens

System Architect and Lead Developer at IDRSolutions
Mark Stephens has been working with Java and PDF since 1999 and has diversified into HTML5, SVG and JavaFX. He also enjoys speaking at conferences and has been a Speaker at user groups, Business of Software, Seybold and JavaOne conferences. He has a very dry sense of humor and an MA in Medieval History for which he has not yet found a practical use.
Markee174

About Mark Stephens

Mark Stephens has been working with Java and PDF since 1999 and has diversified into HTML5, SVG and JavaFX.

He also enjoys speaking at conferences and has been a Speaker at user groups, Business of Software, Seybold and JavaOne conferences. He has a very dry sense of humor and an MA in Medieval History for which he has not yet found a practical use.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>