[tex-live] metapost and PostScript fonts

Eddie Kohler kohler at cs.ucla.edu
Fri Aug 22 04:06:25 CEST 2008

Hi all,

Over several years I've noticed some issues with metapost images that include 
references to modified PostScript fonts.

For example, here's a line from my psfonts.map:

Caled--0 Caledonia "EKAEncoding ReEncodeFont" <[eka.enc <Caled.pfb

"Caled--0" is reencoded by EKAEncoding, which turns "`" and "'" into smart 
quotes.  Now here's a Metapost diagram that uses this font:

prologues := 1;
   draw btex \font\a=Caled--0 at 10pt\a `Hello' etex;

The TeX Live 2007 output, though, looks weird.  Slightly condensed:

%!PS-Adobe-3.0 EPSF-3.0
%%Creator: MetaPost 0.993
%%Pages: 1
%%DocumentFonts: Caled--0
  /Caled--0 /Caledonia def
/fshow {exch findfont exch scalefont setfont show}bind def
%%Page: 1 1
  0 0 0 setrgbcolor 0 0 moveto (`Hello') Caled--0 9.96265 fshow

Things to note:

* How did Caled--0 get in the DocumentFonts line?  That's not a valid font.
* mpost has read enough of psfonts.map to map Caled--0 to Caledonia -- but not 
enough to reencode it properly!

Do I misunderstand?  Am I missing some option?

I've attached a Perl script that I'm using to post-process Metapost output, 
fixing these problems.  You run the script like "fixmpost file.1", which 
rewrites "file.1" to include reencodings, font slants and extensions, and so 
forth.  This may be useful for others.

But it would be very nice if Metapost were fixed to do the right thing.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fixmpost
Url: http://tug.org/pipermail/tex-live/attachments/20080821/46515a71/attachment-0001.pl 

More information about the tex-live mailing list