This directory contains three programs for manipulating the Hershey
character set used by PGPLOT. 

Note: only pgpack is required to install PGPLOT. The other two
programs, pgunpack and pgdchar, are not supported and may not work on
all systems.

pgunpack.f: convert the binary file grfont.dat into an editable text file
        grfont.txt

pgpack.f:   perform the reverse operation. (pgpack.ngh is a variant version
	of this program for the Oasys Green Hill Fortran compiler on NeXT
	systems)

pgdchar.f:  display the construction of selected characters on any PGPLOT
        device.

------------------------------------------------------------------------
WARNING
------------------------------------------------------------------------
Do not change the index numbers assigned to the Hershey symbols: they
are used throughout PGPLOT. 

Do not delete existing Hershey symbols. 

Do not modify existing Hershey symbols. 

If you add new symbols, note that the internal buffers used by PGPLOT
have a finite capacity. If you exceed this capacity, you will have to
increase the buffer size, and will thereby generate a version of PGPLOT
which is incompatible with all other versions. 
------------------------------------------------------------------------

The ASCII font file (GRFONT.TXT) contains the character digitizations in
record groups, as follows: 

  first: NC,LENGTH,(XYGRID(I),I=1,5)
  remaining: (XYGRID(I),I=6,LENGTH)

The Fortran format for each record is (7(2X,2I4)). 

NC is the Hershey character number, which is an integer in the range
1-4000. Not all numbers have corresponding characters (only about 1600
characters are defined). The character number is used to identify the
character. 

LENGTH is the number of entries in the XYGRID array for this character.
It is always at least 5; it is equal to 5 for non-printing characters
(spaces of various widths). 

The first five entries in XYGRID(*) are the character extents: 

XYGRID(1) = minimum y value.
XYGRID(2) = baseline y value.
XYGRID(3) = maximum y value.
XYGRID(4) = minimum x value.
XYGRID(5) = maximum x value.

The minimum and maximum values do not necessarily correspond to the
actual (x,y) coordinates in the remainder of xygrid(*), but specify a
`bounding box' for the character. The center of each character grid is
at (0,0), and actual coordinates lie in the range (-49..+49).  A
coordinate pair (-64,0) is a request to raise the pen before moving to
the next point, and a pair (-64,-64) signals end-of-data for the current
character. 

For normal roman characters, the baseline is the line on which the base
of the character is placed, the minimum y-value is reached by lower-case
descenders, and the maximum y-value is the level of the top of
upper-case letters. For standard-size letters, the `height' (maximum y
minus baseline) is 21 units, and the `depth' (baseline minus minimum y)
is 7 units. Thus in continuous text, successive baselines must be
separated by at least 28 units. The character `width' (maximum x minus
minimum x) is different for different characters. The bounding box
includes intercharacter spacing, so the left edge of the bounding box of
one character should normally abut the right edge of the preceding
character. The font file contains no `kerning' information for fine
adjustment of character spacing for special pairs like 'AV'. Some
characters (e.g., lower case italic `f') extend outside the bouding box,
but the bounding boxes should still abut for correct character
placement. 

For the internal binary representation of the character digitization it
is necessary to choose a coding that is efficient in both space and cpu
time. The coordinates are all in the range (-64,49) and could be
represented in an 8-bit signed integer, such as the VAX BYTE data type.
PGPLOT actually follows Nelson Beebe's PLOT79 package, however: it adds
64 to each coordinate and then packs two coordinates in an INTEGER*2
word. This implementation should be portable to any system in which the
INTEGER data type is 16 or more bits. 
