Saturday, July 10, 2021

You can remove type-3 fonts from PDF figures with inkscape

Certain applications will generate a PDF with Type-3 fonts (e.g. matplotlib). If these are embedded in your document with LaTeX, many conference/journal submission platforms will reject it. If you load the PDF subfigures with inkscape and save it to a new file with default settings, the Type-3 fonts will be converted to TrueType.

This solution is nice because inkscape is free and you don't need to a) generate new figures with matplotlib and specific settings, b) use not-free software, or c) fight with the density/resolution settings of the "convert" utility.

I actually discovered this on accident in a recent paper. A pdffonts command revealed that most of my plots to contained Type-3, except ones edited with inkscape to add an overlayed image. (Side note: I use inkscape instead of rasterization for this because it's important to keep all text non-rasterized for digital readability.)