The directory PGPLOT.PSDRIV contains a patch for PGPLOT version 5.2 to enable the use of PostScript Fonts. These include extensions to PGPLOT directives and environmental variables. The patch works without change also for PGPLOT version 5.2.2.
If the variable PGPLOT_PS_FONT is set to NO then the driver is fully 'backwards compatible'. The patch affects modules psdriv.f and grtext.f
For example of use, see psdemo.f. For example of output, see psdemo.ps
To install, replace modules psdriv.f and grtext.f in the PGPLOT source distribution and compile as usual.
-- Peter Smulders <p.j.m.smulders@home.nl> March 1998
The environmental variable PGPLOT_PS_FONT is used to control the PostScript fonts for text strings output by PGPLOT. Specify ``NO'' to suppress use of PostScript fonts.
The default font family is Times. Another font family may be selected by giving PGPLOT_PS_FONT a specific value, e.g. 'Courier', 'Helvetica', 'NewCentury', 'Zapf'. Fontnames may be truncated to 3 or more letters, and case is ignored; e.g. the values 'NewC' and 'NEW' are equivalent to 'NewCentury'.
Fonts may also be set by directives imbedded in the text.
Unlike other PGPLOT drivers a distinction is made between
\fr
and \fR
, and between \fi
and \fI
.
\fi : set Italic font \fr : set Roman font \fR : set bold font \fI : set bold italic font \fn : set normal font, acts the same as \fr.
These directives only apply to the remainder of the current string.
In addition a font family may be chosen by directives
\fT : set font family Times, \fH : set font family Helvetica \fC : set font family Courier \fM : set font family NewCentury, [the n was already taken by normal] \fZ : set font family Zapf.
These directives apply to the remainder of the current Page.
Example: the string \fC\fR text1
results in text1
in Courier Bold.
The default font for subsequent strings is now Courier.
As a last resort, for PostScript fonts, one can also use the directive \f<n>, where <n> is the character CHAR(N+32), and N is the font's number in the array FONTNAME, defined below.
\fT, \fH, \fM, \fZ
directives are specific for this driver.
FONTNO FONTNAME 0 Symbol
1 Times-Roman 2 Times-Italic 3 Times-Bold 4 Times-BoldItalic
5 Helvetica 6 Helvetica-Oblique 7 Helvetica-Bold 8 Helvetica-BoldOblique
9 Courier 10 Courier-Oblique 11 Courier-Bold 12 Courier-BoldOblique
13 NewCenturySchlbk-Roman 14 NewCenturySchlbk-Italic 15 NewCenturySchlbk-Bold 16 NewCenturySchlbk-BoldItalic
17 ZapfChancery 18 ZapfChancery-Oblique 19 ZapfChancery-Bold 20 URWGroteskT-Bold
21 URWAntiquaT-RegularCondensed
22 Cyrillic
23 ZapfDingbats