[pdftex] Metapost and PDF files

Reinhard Kotucha reinhard at kammer.uni-hannover.de
Sun Apr 29 01:34:59 CEST 2001

>>>>> "Christopher" == Christopher S Swingley <cswingle at iarc.uaf.edu> writes:

    > Hi!  I'm having a devil of a time trying to figure out how to
    > use Metapost in combination with PDFTeX and Ghostscript.  I
    > believe the problem is that I want to use the Computer Modern
    > fonts in my figures, but the only program that seems to
    > understand how to deal with these fonts is dvips.  I can put
    > 'prologues:=1;' at the top of my *.mp file, but then I get fonts

prologues:=1 is for troff, you need prologues:=2.

    > [...]

    > I've loaded the Computer Modern fonts into ghostscript so it can
    > read them by doing: gs prfont.ps, and then typing GS> /cmr10
    > DoFont, but Ghostscript doesn't seem to know what to make of the
    > fonts in the Metapost figure files (gs: Error: /undefined in
    > cmr10, gs: Operand stack: (1)).

The Type1 Computer Modern fonts provided by Y&Y use capital letters
for font names.  If you look into the file cmr10.pfb you'll find a

/FontName /CMR10 def

This is your problem.  The metapost output file file contains a line 

/cmr10 /cmr10 def

You could change it to

/cmr10 /CMR10 def

But this is not very convenient.

I recently wrote a Perl script that scans teTeX's truetype and type1
directories and creates a Fontmap file for ghostscript.  It adds
aliases for the Y&Y cm fonts and for the URW lw35 fonts.

It requires t1ascii and t1binary (from the t1utils) and ttf2afm.
The program assumes that ghostscript doesn't need any font that is not
made available to TeX.

If you are interested, I'll send you the program by private email.
After some cleanup I'll make it available to the public, anyway.

BTW., I would like to support Type42 as well, but I've never seen such
a beast.  Could anyone enlighten me?


Reinhard Kotucha			               Phone: +49-511-751355
Berggartenstr. 9
D-30419 Hannover	              mailto:reinhard at kammer.uni-hannover.de
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.

More information about the pdftex mailing list