How to embed fonts when using pdflatex and gnuplot

IEEE require that PDF documents are created with embedded fonts. To do this, run

$ updmap --setoption pdftexDownloadBase14 true

And then run pdflatex again. To check whether it is embedded, run pdffonts on to the newly created pdf. You will see something like this.

$ pdffonts draft_isic2009_1.pdf
name                                 type              emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
OONIXM+NimbusRomNo9L-Regu            Type 1            yes yes no       6  0
LREKMX+NimbusRomNo9L-MediItal        Type 1            yes yes no       7  0
GPJANF+NimbusRomNo9L-Medi            Type 1            yes yes no       8  0
SOCFYY+CMMI10                        Type 1            yes yes no       9  0
XUABDJ+CMR10                         Type 1            yes yes no      18  0
[none]                               Type 3            yes no  no      19  0
[none]                               Type 3            yes no  no      20  0
NYFSWW+CMR7                          Type 1            yes yes no      21  0
[none]                               Type 3            yes no  no      22  0
Symbol                               Type 1            no  no  no      25  0
MJDZZV+Arial                         TrueType          yes yes no      26  0
NEOHJY+Arial                         TrueType          yes yes no      33  0
RGPVWY+CMMI7                         Type 1            yes yes no      42  0
QFGUOO+Arial                         TrueType          yes yes no      45  0
WHIAUZ+NimbusRomNo9L-ReguItal        Type 1            yes yes no      54  0
Symbol                               Type 1            no  no  no      57  0
KLCILH+Arial                         TrueType          yes yes no      58  0
SHWEVG+Arial                         TrueType          yes yes no      65  0
PWUUWC+Arial                         TrueType          yes yes no      71  0

Now you notice that Symbol font is not embedded. It turns out to be from the figures that I have. I created my figures using Gnuplot, and it gives the eps file. The eps file is then converted to pdf using epstopdf command. If you type pdffonts to this figures, you will notice that the symbol font is not embedded. To ensure that the symbol font is embedded, edit the following file:

/usr/share/ghostscript/8.61/lib/gs_pdfwr.ps

And comment the lines as shown below:

/.standardfonts [
% /Courier /Courier-Bold /Courier-Oblique /Courier-BoldOblique
% /Helvetica /Helvetica-Bold /Helvetica-Oblique /Helvetica-BoldOblique
% /Times-Roman /Times-Bold /Times-Italic /Times-BoldItalic
% /Symbol /ZapfDingbats
] readonly def

After this, run epstopdf again, and check using pdffonts. I ran my pdflatex to my tex file again, and check to find that all fonts have been embedded:

$ pdffonts draft_isic2009_1.pdf
name                                 type              emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
OONIXM+NimbusRomNo9L-Regu            Type 1            yes yes no       6  0
LREKMX+NimbusRomNo9L-MediItal        Type 1            yes yes no       7  0
GPJANF+NimbusRomNo9L-Medi            Type 1            yes yes no       8  0
SOCFYY+CMMI10                        Type 1            yes yes no       9  0
XUABDJ+CMR10                         Type 1            yes yes no      18  0
[none]                               Type 3            yes no  no      19  0
[none]                               Type 3            yes no  no      20  0
NYFSWW+CMR7                          Type 1            yes yes no      21  0
[none]                               Type 3            yes no  no      22  0
CNBJKM+Symbol                        Type 1C           yes yes no      25  0
MJDZZV+Arial                         TrueType          yes yes no      26  0
NEOHJY+Arial                         TrueType          yes yes no      35  0
RGPVWY+CMMI7                         Type 1            yes yes no      44  0
QFGUOO+Arial                         TrueType          yes yes no      47  0
WHIAUZ+NimbusRomNo9L-ReguItal        Type 1            yes yes no      56  0
CNBJKM+Symbol                        Type 1C           yes yes no      59  0
KLCILH+Arial                         TrueType          yes yes no      60  0
SHWEVG+Arial                         TrueType          yes yes no      69  0
PWUUWC+Arial                         TrueType          yes yes no      75  0

Advertisements

2 Responses

  1. Thanks a lot! Finally a working solution

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: