Are there really 3 types of fonts in PDF files?
There is an old joke that runs
There are 3 types of Mathematican. Those who can count and those who can’t (well I thought it was quite funny)….
I was reminded of it it this week looking at some example PDF files. In theory there are two types of fonts which really translate into three types with a messy third case. Read on and see if you agree with me….
PDF files have very flexible font capabilities and one of the key decisions you make is to whether you include the fonts you are using or not. In theory, there are 8 fonts families guaranteed to be available in the PDF viewer (Courier, Arial, etc) although even this is confused (is TimesNewRoman technically the same as TimesNewRomanPS?). Otherwise you can embed the fonts you need so that they can be displayed on any system. This makes the PDF files bigger but guarantees they look as you attended.
So in theory, if you choose not to include a font in a PDF file by embedding it, you will get smaller files but you will need to be sure it is on every machine that will view the PDF has that font installed unless it is one of the standard font families. But there is a third category….
If you open a PDF file containing some non-embedded fonts (like SongST) in Acrobat, you will be asked if you wish to download the font pack and SongST will be installed. But this is not part of the PDF spec. So if you use another PDF viewer (Preview on Mac, Xpdf, we also have a very nice PDF viewer as well!), we cannot offer the option to download the files.
And while Acrobat installs the fonts on the system so that they can be accessed (/Library/fonts/ on my Mac and C:/Program Files/Adobe/Reader10.0./fonts/cid on my PC), the actual license rules only stipulate their use in Acrobat itself.
There are several free fonts which can be used as alternatives, but I find it all rather messy and I think it defeats the purpose of having a nice open PDF standard. What do you think?
This post is part of our “Fonts Articles Index” in these articles we explore Fonts.
Latest posts by Mark Stephens (see all)
- Introducing the new XFA Parser in FormVu - May 16, 2018
- Moving to JPedal release 8 - May 2, 2018
- Which version of Java SE should I use? - April 25, 2018
- How we are improving our code quality with IDEA in 2018 - March 7, 2018
- How we are improving our code quality with NetBeans in 2018 - March 1, 2018