MathGroup Archive 2000

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

Search the Archive

Re: export graphic to ps---trouble with fonts

  • To: mathgroup at smc.vnet.net
  • Subject: [mg22555] Re: [mg22484] export graphic to ps---trouble with fonts
  • From: Martin Stockhammer <martin.stockhammer at visualanalysis.com>
  • Date: Sat, 11 Mar 2000 17:52:33 -0500 (EST)
  • Organization: Visual Analysis GmbH
  • References: <8a50kq$d58@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Steven,

another way is, to show ghostscript where it can find the Mathematica
Type1-Fonts.
To do this you have to edit the Fontmap-File in the ghostscript
directory
and insert the following lines:
You have to update the path for the fonts. 


%%%%%
% GhostScript Fontmap add-on for Windows platform
%
% Created by P.J. Hinton, Wolfram Research Technical Support 
%
% This file is freely distributable without warranty.
% 
% This file can be appended to the GhostScript Fontmap file, which 
% resides in the top level GhostScript (not GSView) directory.  It
% tells GhostScript where to find the Type 1 fonts that are installed
% by Mathematica 4.  This will allow typeset characters in your 
% graphics to appear correctly when rendered in GSView32 and when
% you convert Mathematica 4 generated PostScript files to a 
% non-PostScript printer format.
%
% This file is written with the assumption that Mathematica 4
% is installed to 
%
% C:\Program Files\Wolfram Research\Mathematica\4.0\
% 
% If a different setup exists on your system, you will need to 
% update the contents below accordingly.  Note that MS-DOS=compliant
% 8+3 filenames are used here because the comments in the Fontmap
% file suggest that this is mandatory.
%
% Greek characters
%
/Math1
(c:/progra~1/wolfra~1/mathem~1/4.0/system~1/fonts/type1/math1.pfa);
/Math1-Bold
(c:/progra~1/wolfra~1/mathem~1/4.0/system~1/fonts/type1/math1-~1.pfa);
/Math1Mono
(c:/progra~1/wolfra~1/mathem~1/4.0/system~1/fonts/type1/math1m~2.pfa);
/Math1Mono-Bold
(c:/progra~1/wolfra~1/mathem~1/4.0/system~1/fonts/type1/math1m~1.pfa);
%
% Stretchable grouping symbols
%
/Math2
(c:/progra~1/wolfra~1/mathem~1/4.0/system~1/fonts/type1/math2.pfa); 
/Math2-Bold
(c:/progra~1/wolfra~1/mathem~1/4.0/system~1/fonts/type1/math2-~1.pfa);
/Math2Mono
(c:/progra~1/wolfra~1/mathem~1/4.0/system~1/fonts/type1/math2m~2.pfa);
/Math2Mono-Bold
(c:/progra~1/wolfra~1/mathem~1/4.0/system~1/fonts/type1/math2m~1.pfa);
%
% Mathematical relational symbols
%
/Math3
(c:/progra~1/wolfra~1/mathem~1/4.0/system~1/fonts/type1/math3.pfa);
/Math3-Bold
(c:/progra~1/wolfra~1/mathem~1/4.0/system~1/fonts/type1/math3-~1.pfa); 
/Math3Mono
(c:/progra~1/wolfra~1/mathem~1/4.0/system~1/fonts/type1/math3m~2.pfa);
/Math3Mono-Bold
(c:/progra~1/wolfra~1/mathem~1/4.0/system~1/fonts/type1/math3m~1.pfa);
%
% Arrow Symbols
%
/Math4
(c:/progra~1/wolfra~1/mathem~1/4.0/system~1/fonts/type1/math4.pfa);
/Math4-Bold
(c:/progra~1/wolfra~1/mathem~1/4.0/system~1/fonts/type1/math4-~1.pfa);
/Math4Mono
(c:/progra~1/wolfra~1/mathem~1/4.0/system~1/fonts/type1/math4m~2.pfa);
/Math4Mono-Bold
(c:/progra~1/wolfra~1/mathem~1/4.0/system~1/fonts/type1/math4m~1.pfa);
%
% Script letters
% 
/Math5
(c:/progra~1/wolfra~1/mathem~1/4.0/system~1/fonts/type1/math5.pfa);
/Math5-Bold
(c:/progra~1/wolfra~1/mathem~1/4.0/system~1/fonts/type1/math5-~1.pfa);
/Math5Mono
(c:/progra~1/wolfra~1/mathem~1/4.0/system~1/fonts/type1/math5m~2.pfa);
/Math5Mono-Bold
(c:/progra~1/wolfra~1/mathem~1/4.0/system~1/fonts/type1/math5m~1.pfa);
%
% Bitstream Swiss 721 -- lookalike fonts for Helvetica
%
/Swiss721BT-Bold
(c:/progra~1/wolfra~1/mathem~1/4.0/system~1/fonts/type1/swiss7~1.pfa);
/Swiss721BT-BoldItalic
(c:/progra~1/wolfra~1/mathem~1/4.0/system~1/fonts/type1/swiss7~2.pfa); 
/Swiss721BT-Italic
(c:/progra~1/wolfra~1/mathem~1/4.0/system~1/fonts/type1/swiss7~3.pfa);
/Swiss721BT-Roman
(c:/progra~1/wolfra~1/mathem~1/4.0/system~1/fonts/type1/swiss7~4.pfa);
%%%%%

Now ghostscript will use the correct fonts.
For additional information look at support.wolfram.com.


Bojan Bistrovic schrieb:
> 
> > I want to export a graphic to postscript format (for Ghostview) as an
> > illustration to a document written for LaTex.  My problem is the fonts in
> > the legend, axes and elsewhere.  I can make them look they way I want in
> > Mathematica, but in the exported I always get courier fonts.
> >
> > Can I get links to Mathematica's fonts in the exported graphic, or get
> > Mathematica to use LaTex fonts so that they will not change when exported?
> > Other solutions?
> > --
> > scrog at lvcm.com
> > Steven Scroggin
> >
> >
> No; that's not correct. What happens is that Mathematica uses Math1, Math2,
> etc. fonts in your graph. Ghostscript doesn't know how to load them so it
> substitutes Courier by default. Adding the option
> 
> DefaultFont->{"Times",12}
> 
> or
> 
> TextStyle -> {FontFamily -> "Times", FontSize->12}
> 
> to the Plot[... ] function will change the font to 12pt  Times font, but will
> still display brackets and parenthesis in Math2 font. Changing THAT isn't
> that simple. What I usually do is open the file in vi-editor and change the
> font manually, for example change the line
> 
> /Math2 findfont 10.000000 scalefont
> 
> to
> 
> /Times-Roman findfont 10.000000 scalefont
> 
> or
> 
> /Helvetica findfont 10.000000 scalefont
> 
> or whatever font you want to use. Then, since Math2 font has different
> encodings you have to change the characters themselves:
> 
> (@) show                        to                      ([) show
> (D) show                        to                      (]) show
> (H) show                        to                      (\() show
> (L) show                        to                      (\)) show
> 
> Note that parenthesis are special characters in PostScript so you have to
> protect them with a backslash. Now, since you're already editing the
> PostScript file, you might as well change the locations of the text if you
> want. In lines like
> 
> 77.312500 12.312500 moveto
> (some text) show
> 
> change the numbers 77.312500 12.312500 for positioning to fit your needs.
> 
> Bye, Bojan
> 
> --
> ---------------------------------------------------------------------
> Bojan Bistrovic,                                      bojanb at jlab.org
> Old Dominion University, Norfolk VA & Jefferson Lab, Newport News, VA
> ---------------------------------------------------------------------

-- 
---

Martin Stockhammer
Visual Analysis GmbH
http://www.visualanalysis.com
email: martin.stockhammer at visualanalysis.com


  • Prev by Date: Re: iterations, recursions and derivatives
  • Next by Date: Re: equation is too complex?
  • Previous by thread: Re: Re: export graphic to ps---trouble with fonts
  • Next by thread: Re:Generating all combinations