MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Problem rendering Mathematica fonts in eps and pdf files.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg38492] Re: [mg38467] Problem rendering Mathematica fonts in eps and pdf files.
  • From: "P.J. Hinton" <paulh at wolfram.com>
  • Date: Fri, 20 Dec 2002 04:24:55 -0500 (EST)
  • Organization: "Wolfram Research, Inc."
  • Sender: owner-wri-mathgroup at wolfram.com

On Wed, 18 Dec 2002, Ron wrote:

> I have a graphic produced in Mathematica which I would like to call from a
> Latex document to be ultimately viewed as a ps and/or pdf file. The
> final file produced however, does not render the Mathematica fonts
> satisfactorily if at all.
>
> First I generate the files graphic.eps and graphics.pdf using the
> Export command.
>
> The following (separate) attempts all have no effect in rendering the
> Mathematica fonts when trying to view the files graphic.eps or graphic.pdf.
>
> 1. Instruct the ps viewer (GSVIEW32 Version 3.6) to see the Mathematica fonts
> by adding to the "ghostscript include path" the directory C:\Program
> Files\Wolfram Research\Mathematica\4.2\SystemFiles\Fonts\Type1
>
> 2. Append directives (supplied by P.J. Hinton) to the file Fontmap (
> C:\Program Files\ghostscript\gs6.50\lib) to enable Mathematica fonts to be
> seen as suggested by Mathematica support at
> http://support.wolfram.com/mathematica/graphics/export/ghostscript.html
>
> 3. Copy the Mathematica fonts (C:\Program Files\Wolfram
> Research\Mathematica\4.2\SystemFiles\Fonts\Type1) into C:\Program
> Files\ghostscript\fonts to enable them to be seen.

These three steps are all different approaches to making the Type 1
Mathematica fonts available to Ghostscript.  For GSView32, the best thing
to do is to pass the path to the fonts in the FONTPATH switch.

1) Click on the menu command Options -> Advanced Configure...

2) One the resulting dialog box, locate the field labeled "Ghostscript
Options."  There should be an option therein that reads:

-sFONTPATH="c:\psfonts"

Edit this option to include the path to the fonts.  With a default
Windows, install, the setting would look something like:

-sFONTPATH="c:\psfonts;C:\Program Files\Wolfram Research\Mathematica\4.2\SystemFiles\Fonts\Type1"

Note that the semi-colon is used to delimit path elements in the string.

No further adjustments need to be made.

> I have also tried selecting the graphic and then printing to the file
> graphic.eps.  This *does* seems to embed the fonts in resulting
> graphic.eps.I can then use the ps viewer to convert this file
> graphic.eps into graphic.pdf.

It sounds as if you are relying on the printer driver to do the work here.
If that is the case, then it is most likely embedding the TrueType version
of the Mathematica fonts as Type 42 fonts.

> The graphic.eps file turns out fine but the graphic.pdf file when viewed
> generates an error ("The font 'YWFNOL+TT9Co00' contains a bad /BBox")
> and also the Mathematica fonts are rendered but with a markedly lighter
> font weight ?

I'm not sure what could be causing this problem.  I'm assuming that you
are creating the PDF using Ghostscript by way of GSView32.

> Furthemore when I call these files in a latex document using
> \includegraphics[scale=0.85]{graphic.eps}
> ( \includegraphics[scale=0.85]{graphic.pdf} )
>
> the graphic does not appear at all in the resulting ps (pdf) file ?
> They *do* appear however,if they were generated using the Export
> command although as mentioned previously in this case the fonts are
> all stuffed up !?
>
> I have wasted some time trying to do what I imagine should be a simple
> and routine task - Is there something obvious I am missing here ?

One other thing you could try is to embed the Mathematica fonts in the EPS
files using emmathfnt, which is a free utility that you can set up to work
in tandem with the kernel's Export[] function.  The tool is available from
MathSource, and it works fine with Mathematica 4.0.x and 4.1.x.  It needs
some changes to be compatible with Mathematica 4.2.0.  You can contact
Technical Support for an updated version of the utility.

Mathematica 4.2.1 introduces a new setting that allows the user to toggle
embedding, and font embedding is turned on by default.

-- 
P.J. Hinton
User Interface Programmer                         paulh at wolfram.com
Wolfram Research, Inc.
Disclaimer: Opinions expressed herein are those of the author alone.




  • Prev by Date: Re: Surface fitting question
  • Next by Date: Re: Problem rendering Mathematica fonts in eps and pdf files.
  • Previous by thread: Problem rendering Mathematica fonts in eps and pdf files.
  • Next by thread: Re: Problem rendering Mathematica fonts in eps and pdf files.