Type 1 Font for Matplotlib
When figures are generated in Matplotlib, they use “Type 3” font by default, which is conflict with some publishers’ requirements for posting a paper in some conference. This essay mentions the solution for this issue.
Check fonts used in a PDF with PdfFonts
PdfFonts
can be installed with Brew
in Mac:
or
Note that both tools are based on “XQuartz”, a X Window System running on OS X. So following the instructions if error occurs.
After you are done with the installation, you can run following command in the terminal to check fonts in a PDF file:
In OS X, there is an alternative solution to get the font information. However, it doesn’t work for pdflatex
PDFs.
In my case, the figures drawn by Matplotlib have “Type 3”. This is not allowed in some publishers’ rules. So I need to redraw figures with “Type 1”.
Matplotlib configurations
Use the following statements to configure the Matplotlib. The figures will be plotted with “Type 3” font. However, the fonts of letters and numbers may vary. For example, the letters are bold, while the numbers are not.
Found an alternative solution online: