Login



Page Rank
PDF Print E-mail
Written by Batuhan Osmanoglu   
Thursday, 12 November 2009 20:42

Embed fonts in EPS/PDF

Some publishers require all fonts to be embedded in the EPS/PDF files before you submit your paper for review. This "naive" request can cause quite some trouble.

I prepare my figures in EPS format and use them in LaTeX that way. So for me the question was how to "Re-Write and EPS and embed figures?"

Command For Converting EPS to PDF and embedding fonts:

ps2pdf -dSubsetFonts=true -dEmbedAllFonts=true TimeSpan.eps TimeSpanEmbedded.pdf 

 However the "EmbedAllFonts=true" does not really work until you edit a configuration file for ghostscript. Kurniawano's blog helped a lot. On a Ubuntu 9.04 system the file is located at:

/usr/share/ghostscript/8.64/Resource/Init/gs_pdfwr.ps

 If it is not there look for gs_pdfwr.ps file in your operating system. We need to edit this file and comment out the "standardfonts". This is how mine looks after commenting out the definitions:

/.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

 I also updated my character map files using the following command line but I'm not sure about it's necessity:

updmap --setoption pdftexDownloadBase14 true 

We can use pdffonts utility after converting the EPS files to PDF.

$ pdffonts TimeSpanEmbedded.pdf 
name                                 type              emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
ODHICA+Helvetica                     Type 1C           yes yes no       8  0   

I wanted to have EPS files as the final product. For that I used the following commandline to convert the PDF back to EPS:

$ pdftops -eps TimeSpanEmbedded.pdf 
 

See Also