One of the issues we get a lot with PDFs is the issue of non-embedded fonts. There are types of fonts in a PDF file:-
1. Fonts belonging to the 8 defined families (Arial, Helvetica,etc) defined as being in a PDF Viewer.
2. Embedded fonts – all the font data is included in the PDF so we can draw the fonts.
3. Non-embedded fonts. Because Adobe does not enforce the first 2 cases, it is perfectly possible to have a font where we only have the name (ie Frigate). The PDF Creator is relying on the user having a local copy of a font called Frigate which the viewer will then use. This also assumes my version of Frigate is the same as yours.
This makes like very hard for a PDF viewer (especially if you want to be cross platform or run on a virtual machine). So this is how we deal with such fonts:-
A. If there is a local font of the same name available use that.
B. If there seems to be an obvious match (Arial Bold would seem a good match for ArialMT and ArialNarrow while we can use TimesNewRoman is TimesNewRomanPS). We do this through a mix of pattern matching and our lookup table in FontMappings class.
This works very well but it is not perfect. So what do we do about Frigate?
This post is part of our “Fonts Articles Index” in these articles we explore Fonts.
Latest posts by Mark Stephens (see all)
- 3 ways that the European Union is changing the way Companies write software in 2018 - January 31, 2018
- IDRsolutions product range update for 2018 - January 22, 2018
- 4 ways Companies can make remote working successful - December 21, 2017
- My experience of a Turkish bath (visiting Istanbul for DevFest) - November 24, 2017
- My 5 key takeaways from JavaOne 2017 - October 6, 2017