Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Fonts and graph export


From   [email protected] (Alan Riley)
To   [email protected]
Subject   st: Re: Fonts and graph export
Date   Wed, 20 Aug 2003 11:18:04 -0500

Nicholas Winter ([email protected]) wrote
> I'm trying to specify a font face in a -graph export- command, in which I'm 
> exporting to an encapsulated postscript file. The font I want to use is 
> TrueType (I'm on windows); its name is "Palatino Linotype".  I can't get it 
> to work, no matter what I do with the font() option.
> 
> When I specify font("Palatino Linotype"), stata creates the .eps file, but 
> then acrobat complains about it.
> 
> When I print the graph from Stata directly to Acrobat Distiller, things 
> work perfectly--I get a pdf file with the right font--so it must be possible.

There is a distinction between creating an EPS file from Stata directly
and creating an EPS file (or any other kind of file) by going through
a Windows printer driver.

When you print through the Windows printer driver (which might lead to
Acrobat Distiller rather than a 'real' printer) , you are directly
telling Windows to draw points, lines, text, and other objects, and
the printer driver is supposed to understand how to convert that
information into whatever format the output device understands.
Thus, Stata sends the same set of commands to an Acrobat Distiller
printer driver as it would to an HP printer driver, an Espon printer
driver, or any other printer driver you might have installed.

PostScript does not directly understand TrueType fonts.  When you
print through Acrobat Distiller or some other Windows printer driver,
TrueType fonts are converted to some format understood by the output
device.  There is some communication between the Acrobat printer
driver and Windows that causes the font to be rendered appropriately.
Perhaps it is being mapped to a PostScript font that closely approximates
that particular TrueType font, or perhaps it is being rendered in some
other way.  It is no longer a TrueType font, however.

When you directly create an EPS file from Stata, and you wish to
change the default font, you must use the name of a PostScript font
that will be understood by your output device, be that a printer
or Acrobat Distiller.  If you create an EPS file by printing through
a Windows printer driver, the TrueType font may be converted to
something Distiller will understand.

If you were printing to a PostScript printer that only had the fonts
Courier and Times, and you specified the font Helvetica in your
Stata .ps file, you would not see Helvetica when the file printed since
the printer does not understand it.

After doing some research on the web, I believe that Distiller may
do the appropriate thing if it knows where the font "Palatino Linotype" is
installed on your system.  Also, there are some resources on this page

   http://cgm.cs.mcgill.ca/~luc/ttsoftware.html

which may allow you to convert that TrueType font into a PostScript
font which might then be picked up by Distiller.


--Alan
([email protected])
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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