Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: eps font export

From   Simon Krug <>
Subject   st: eps font export
Date   Thu, 23 Mar 2006 19:07:58 +0100

Thanks to Nick W. and Thomas.

I've gone through this trial and error process too.

Thomas solution works. In the "graph set eps fontface Times-Roman" command i've to use the exact name of the Postscript type I font. I took it from the font-list in my joboptions settings.


I totally agree with Nick W., getting the font you want when going from
eps to pdf is a frustrating trial and error process. I use ghostscript
(which is free), but I also use distiller. In ghostscript, once you get
it right, do backup all of your ghostscript program folders and make a
copy of the command you used.

Now, to get the font you want to display in the pdf, you have to make
sure that the font name you used when you specified the eps export, be
the same as the font name ghostscript or distiller uses. In order to
use custom fonts in ghostscript (I'm assuming Win), you will need to
modify the (...\gs\gs8.XX\lib\ I first copied
the fonts I needed in the font folder of Ghostscript ( ...\gs\fonts\).
Under Win you want to use fonts with extension *.pfb (these are
Postscript type I fonts). Then I added these fontname to
Here's an example:
% Additional fonts added by Thomas.

/Frutiger-Plain47 (LTe52125.pfb) ;
/Frutiger-Plain57 (LTe52126.pfb) ;
/Futura-Light-Condensed-Italic (LTe50193.pfb) ;
/Futura-Light-Condensed (LTe50192.pfb) ;
/Futura-Light (LTe50150.pfb) ;
/Futura-Light-Italic (LTe50151.pfb) ;
/LinotypeTetria-Regular (LT_54530.pfb) ;

Finally, if all works, you use the names on the left when telling eps
export which font to use.

For Distiller you should also make sure that the fonts you want to use
are installed on your system and that Distiller knows where to look for
them (usually it does). Again, as in Ghostscript, you need to use the
correct fontname which is always a challenge, even more so in Distiller.
This is where the trial and error starts...

Here are some examples.
To convert from ps to png using ghostscript and custom fonts:
graph set ps pagesize custom;
graph set ps pagewidth 11;
graph set ps pageheight 8.5;
graph set ps tmargin 0;
graph set ps lmargin 0;
graph set ps logo off;
graph set ps fontface Futura-Light-Italic;

graph export "", cmyk(off) replace;
shell "C:\Program Files\gs\gs8.53\bin\gswin32.exe"
-r100 -g1100x850 -sDEVICE=pngalpha
-dGraphicsAlphaBits=4 -dTextAlphaBits=4
-sOutputFile="mygraph.png" "";

To convert from eps to pdf using Adobe Distiller and custom fonts:
graph set eps logo off;
graph set eps fontface Futura-Light-Italic;
graph export "mygraph.eps", cmyk(on) preview(on) orientation(landscape)
shell "C:\Program Files\Adobe\Acrobat 7.0\Distillr\acrodist.exe"
/n /q /j "Stata_Prepress.joboptions"
/o H:\mygraph.pdf H:\mygraph.eps

Hope this helps,

Thomas Speidel
Statistical Associate
Clinical Trials Unit
Tom Baker Cancer Centre
1331 - 29th Street N.W.
Calgary, AB, T2N 4N4

Tel. (403) 521-3370

Simon Krug
Luitpoltstr. 30
96052 Bamberg

Tel: 0951 5190067
Handy: 0170 5624458

* For searches and help try:

© Copyright 1996–2020 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index