.ig >>
<STYLE TYPE="text/css">
<!--
        A:link{text-decoration:none}
        A:visited{text-decoration:none}
        A:active{text-decoration:none}
        OL,UL,P,BODY,TD,TR,TH,FORM { font-family: arial,helvetica,sans-serif;; font-size:small; color: #333333; }

        H1 { font-size: x-large; font-family: arial,helvetica,sans-serif; }
        H2 { font-size: large; font-family: arial,helvetica,sans-serif; }
        H3 { font-size: medium; font-family: arial,helvetica,sans-serif; }
        H4 { font-size: small; font-family: arial,helvetica,sans-serif; }
-->
</STYLE>
<title>ploticus: fonts</title>
<body bgcolor=D0D0EE vlink=0000FF>
<br>
<br>
<center>
<table cellpadding=2 bgcolor=FFFFFF width=550 ><tr>
<td>
  <table cellpadding=2 width=550><tr>
  <td><br><h2>Fonts</h2></td>
  <td align=right>
  <small>
  <a href="../doc/Welcome.html"><img src="../doc/ploticus.gif" border=0></a><br>
  <a href="../doc/Welcome.html">Welcome</a> &nbsp; &nbsp;
  <a href="../gallery/index.html">Gallery</a> &nbsp; &nbsp;
  <a href="../doc/Contents.html">Handbook</a> 
  <td></tr></table>
</td></tr>
<td>
<br>
<br>
.>>

.TH Fonts PL "15-MAY-2003   PL ploticus.sourceforge.net"

.SH What fonts are available?
.LP
This depends on what output format you are producing, since
Ploticus does not include its own internal fonts.

.ig >>
<br><br><br>
.>>
.SH Font file names
In general, font file names that contain embedded spaces will not work.

.ig >>
<br><br><br>
.>>

.SH PNG, GIF, etc.
If the default built-in GD code is used, a basic ascii font is
available in 5 sizes (you can specify any point size in ploticus; the nearest
available size will be used).
You can't set the font from ploticus; \fC-font\fR (etc.) will have no effect.
Vertical rendering is available.
Availability of symbols and nonroman characters is limited to those in ASCII
extended range.  Note: 
some characters in the GD extended range don't agree with X11 or PostScript
(there were apparently conflicting standards defining extended ascii).
The GD character set is defined in \fCgdfontg.c\fR, which may be modified
to suit if necessary.

.ig >>
<br><br><br>
.>>

.SH PNG, JPEG, WBMP with FreeType2 support
If your ploticus build uses GD with FreeType2
support, you can use TrueType fonts.
The basic GD ascii font is also available in 5 sizes, and is the default
(its name is \fCascii\fR should you need to use it explicitly).
You can set the font from ploticus using \fC-font\fR, 
.ig >>
<a href="page.html">
.>>
\0proc page
.ig >>
</a>
.>>
\fCfont\fR attribute,
or \fCfont\fR in any 
.ig >>
<a href="textdetails.html">
.>>
\0textdetails
.ig >>
</a>
.>>
attribute.
TrueType font names should be given without the .ttf extension, 
e.g. if you have a font file called times.ttf you would use 
.IP \0
\fC-font times \fR
.LP
You will need to have some TrueType .ttf font files stored in a directory somewhere.  
The environment variable \fBGDFONTPATH\fR must be 
set to contain the pathname of this directory.
TrueType font files may be found on NT machines in 
\fCc:/winnt/fonts\fR or they may be downloaded on the web.  
.LP
Vertical rendering is available.  
Availability of symbols and nonroman characters:
Constructs such as \fC&#192\fR may be used, and unicode fonts can be used (see below).
.LP
.ig >>
<a href="../gallery/stock.jpeg">
.>>
\0Here is an example rendered using TTF sans serif font.
.ig >>
</a>
.>>
For more information on building ploticus to use FreeType2, see ./src/FreeType2 
and ./src/Makefile.  

.ig >>
<br><br><br>
.>>

.SH PostScript, EPS
Uses PostScript fonts.  The default font is \fC/Helvetica\fR.
You can set the font from ploticus using \fC-font\fR, 
.ig >>
<a href="page.html">
.>>
\0proc page
.ig >>
</a>
.>>
\fCfont\fR attribute,
or \fCfont\fR in any 
.ig >>
<a href="textdetails.html">
.>>
\0textdetails
.ig >>
</a>
.>>
attribute, for example:
.IP \0
\fC-font /Helvetica-Oblique\fR
.LP
Usually these fonts are available: \fC/Helvetica /Helvica-Oblique /Helvetica-Bold
/Helvetica-BoldOblique /Times-Roman /Times-Bold\fR; many others are
usually available as well.
Vertical rendering is available.
Availability of symbols and nonroman characters:
As of version 2.01, the ploticus postscript driver supports
ISO-LATIN encoding, so that European characters and symbols in ASCII extended range
may be used.
You can use the troff-like
.ig >>
<a href="specialchars.html">
.>>
\0special characters
.ig >>
</a>
.>>
feature that uses the /Symbols font.

.ig >>
<br><br><br>
.>>
.SH SVG
If you're using
.ig >>
<a href="svg.html">
.>>
\0SVG
.ig >>
</a>
.>>
, font availablility and naming depends on the environment in
effect where the SVG file is being viewed, ie. if you're viewing on MSIE on a win32 system see the
list of fonts available in MS Word.  SVG viewing environments generally are "intelligent" about 
font selection and substituting.
.LP
Ploticus uses a \fCHelvetica\fR as the default font.
I've also used \fCCourier\fR, \fCTimes-Roman\fR,
\fCBookman\fR, \fCStencil\fR, \fCMagneto\fR, etc.
You can set the font from ploticus using \fC-font\fR, 
.ig >>
<a href="page.html">
.>>
\0proc page
.ig >>
</a>
.>>
\fCfont\fR attribute,
or \fCfont\fR in any 
.ig >>
<a href="textdetails.html">
.>>
\0textdetails
.ig >>
</a>
.>>
attribute, for example:
.IP \0
\fC-font Times-Roman\fR
.LP
Vertical rendering is available.
European characters and symbols in ASCII extended range may be used.
Constructs such as \fC&#192\fR may be used, and unicode fonts can be used (see below)
with \fCutf-8\fR encoding.

.ig >>
<a name=swf></a>
.>>
.ig >>
<br><br><br>
.>>
.SH SWF (flash)
The environment variable SWF_FONTS_DIR must be set to the full
pathname of a directory containing your \fC.fdb\fR font files.
The default will be \fCHelvetica.fdb\fR; you can select a font from the command line
like this: \fC-font Times-Roman\fR which would then attempt to load
\fCTimes-Roman.fdb\fR from your SWF_FONTS_DIR directory.
\fCHelvetica.fdb\fR and a few other fonts are
available as accessories from
.ig >>
<a href="Download.html">
.>>
\0the download page
.ig >>
</a>
.>>


.ig >>
<br><br><br>
.>>

.SH X11
Always uses the same fixed width font.  
You can't set the font from ploticus; \fC-font\fR (etc.) will have no effect.
Depending on availablility, this will be
either \fC-adobe-courier-bold-r-normal\fR, \fC-misc-fixed-medium-r-normal\fR, 
or as a last resort, \fC9x15\fR.  Proper vertical rendering is not available.
Availability of symbols and nonroman characters is limited to those in ASCII
extended range.

.ig >>
<br><br><br>
.>>
.SH UNICODE FONTS
Unicode fonts may be used for titles, labels, tags, category names, etc. in the script or
in data, if you are rendering in SVG or PNG/JPEG with FreeType2 (versions 2.05+).
Unicode is not yet supported within dates.
.LP
Your ploticus script or prefab parameters should be \fButf-8\fR encoded.
You will need a unicode TTF font such as Bitstream Cyberbit (freely downloadable
on the internet).  Set ploticus to use this font.
For SVG, set the XML encoding to \fCutf-8\fR.
Font and XML encoding can be set using
.ig >>
<a href="settings.html">
.>>
\0proc settings
.ig >>
</a>
.>>
, from the 
.ig >>
<a href="pl.1.html">
.>>
\0pl command line
.ig >>
</a>
.>>
, or in a 
.ig >>
<a href="config.html">
.>>
\0config file.
.ig >>
</a>
.>>
).
PNG/JPEG can be viewed by standard means, since the fonts have already been
rendered and do not need to be available to the viewer application.  
SVG must be viewed by an application that has access to your Unicode font(s) 
and as ZZtop says, "knows how to use them";
MSIE browser currently seems to do the best job.


.ig >>
<br><br><br>
.>>
.SH EXAMPLES
.LP
This example shows the ascii and Western European range that is available
by default.
.LP
.ig >>
<center>
<a href="../gallery/ascii.htm"><img src="../gallery/ascii.gif"></a>
</center>
.>>
.ig >>
<br><br><br>
.>>
.LP
This example demonstrates rendering of Chinese using a unicode font.
.LP
.ig >>
<center>
<a href="../gallery/unicode.htm"><img src="../gallery/unicode.png"></a>
</center>
.>>



.ig >>
<br>
<br>
</td></tr>
<td align=right>
<a href="../doc/Welcome.html">
<img src="../doc/ploticus.gif" border=0></a><br><small>data display engine &nbsp; <br>
<a href="../doc/Copyright.html">Copyright Steve Grubb</a>
<br>
<br>
<center>
<img src="../gallery/all.gif">
</center>
</td></tr>
</table>
.>>
