3 ms·
> A PDF is a single file that contains all the images, fonts, and other data needed to render it. A PDF can include the fonts. But it often doesn't, and reli
by thayne 3y ago
> A PDF is a single file that contains all the images, fonts, and other data needed to render it.
A PDF can include the fonts. But it often doesn't, and relies on system fonts. One reason for that is because including fonts in the PDF can dramatically increase the size of the file. In some cases a single font could be larger than the entire rest of the file. I've also worked on implementing embedding fonts in some software that generated PDFs. It was surprisingly difficult to figure out how to get it to work reliably.
> PDFs are rendered consistently.
Not as much as you would think. There are several cases where the same PDF will render differently depending on which PDF viewer you use. Usually the differences are pretty subtle, but occasionally there are edge cases that result in pretty significant differences. I've even run into a case where the same version of Acrobat reader will render a PDF differently depending on what OS you are using.
- EE84M3i 3y agoIs there software that minimizes the fonts by removing code points that aren't used in the document?
- adrian_b 3y agoThis is a standard feature of the PDF format. Normally all PDF documents include only the glyphs corresponding to the code points actually used in the text rendered with that font. That is why you can go for instance to any site of a vendor of fonts and you can download freely a PDF sample text of an expensive font. You can easily extract the font from the sample PDF, but it will be useless, as it will contain only the few letters that had been used in the sample text.
- geraldhh 3y ago> A PDF can include the fonts. But it often doesn't, and relies on system fonts. found this out, after 20-something years of consistent pdf renderings, in a job interview because my docs allegedly looked odd :/ the daily wtf ...
- jxdxbx 3y agoYeah, MS Office PDF generation (at least some time ago) did not generate PDFs with embedded fonts, and I’d often come across weird-looking documents where the system is using a font with the wrong characteristics. Print-to-PDF usually avoids this.
- pseingatl 3y agoThe Arabic glossary of legal terms distributed by the State of California is unreadable unless you open the file in Adobe Reader, search for the name of the font used, download and install the font on your system, close the file and reopen it. I suppose there are many instances of this happening.
- adrian_b 3y agoThere are only a few standard system fonts that can be omitted from a PDF file and the document assumes that whatever fonts will be used for rendering match in metrics the traditional Times, Helvetica, Courier, etc., typefaces. Therefore with compatible system fonts there should be no changes in the layout of the rendered document. There are of course examples of system fonts which are advertised as compatible in metrics with the ancient Adobe PostScript fonts, but which nonetheless have subtle differences. Except for the small number of standard system fonts, for the other fonts the PDF document normally includes only a small subset of their glyphs, corresponding to the characters that are actually used in the text that is to be rendered with that font.