
			      Genscript
			      =========

Genscript is a drop-in replacement for the enscript program.
Genscript converts ASCII files to PostScript and stores generated
output to a file or sends it directly to the printer.  

Genscript is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.

Genscript is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with genscript; see the file COPYING.  If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.


* Supported Character Sets

Genscript supports following character sets:

  - ISO-8859/1		ISO latin1 (default)
  - ISO-8859/2		ISO latin2
  - ISO-8859/3		ISO latin3
  - ascii		7 bit ascii
  - ascii scands	7 bit ascii with following encodings:
			  '{'  =  (adieresis)
			  '|'  =  (odieresis)
			  '}'  =  (aring)
			  '['  =  (Adieresis)
			  '\\' =  (Odieresis)
			  ']'  =  (Aring)
  - IBM/PC		standard PC/DOS character set
  - Mac			Macintosh character set
  - VMS			VMS multinational charset
  - ps			PostScript font's default encoding
  - pslatin1		PostSccript interpreter's `ISOLatin1Encoding'

* Special Escapes

Genscript supports special escapes sequences that can be used to add
simple page formatting commands to ASCII documents.  User can inline
EPS files, change font on-the-fly and insert comments.  See file
README.ESCAPES for details.


* PostScript font support

** AFM files

Genscript supports AFM (Adobe Font Metrics) files.  AFM files contain
font metrics information (character widths, etc); if there is an AFM
file for the current font, genscript can count line widths and tab
stops correctly.  Genscript distribution contains AFM files for the
most common PostScript fonts.  These AFM files are installed to the
directory <prefix>/share/genscript/afm/.

** Fonts (.pfa or .pfb)

Genscript supports also additional PostScript fonts which are defined
in the `.pfa' or `.pfb' font files.  Genscript automatically downloads
font's description to your PostScript document whenever you use an
external disk font.  Font downloading requires that you have both the
`.afm' and `.pf{a,b}' files for you extra fonts and you have created a
font mapping file called `font.map' to your font directory.

These are the steps that are needed to make your extra fonts usable in
genscript:

1) Install the `.afm' and `.pf{a,b}' files to some appropriate
   directory.  Note! for a single font, both the .afm and .pf{a,b}
   files must have  the same prefix, filenames can differ only from
   the suffix part.  For example, if font `FooFont' is defined in the
   file `foo.pfa', then the AFM file must be named `foo.afm'.  

2) Create a font map file for the font directory.  Genscript's
   distribution has an utility called `mkafmmap' which does the job;
   just give command:

	mkafmmap *.afm

   in your font directory.  This command creates a file called
   `font.map' to your font directory.  File contains one row for each
   .afm file, each row has two columns: font's PostScript name and
   the prefix for the corresponding .afm file.

3) Notify genscript that it has new fonts to play with.  This is done
   by editing the global configuration file `genscript.cfg' or the
   personal configuration file `$HOME/.genscriptrc'.  Global
   configuration file has an entry called 'AFMPath' which contains the
   current font search path.  Add your new font directory to this
   path:

	AFMPath: /usr/local/share/genscript/afm:/usr/local/lib/ps:/usr/lib/ps:/fonts/myfontdir

  where `/fonts/myfontdir' is the new font directory.

So how does the font downloading work?  Genscript automatically
downloads font files for header and body fonts, if it can find the
corresponding `.pfa' or `.pfb' files from the AFMPath.  Genscript do
*not* preload fonts that are specified in `^@font' escapes, however
you can download these font by specifying command line option
`--download-font=name' for each font.  You can also specify
downloadable fonts in the global configuration file `genscript.cfg' or
in your personal configuration file `$HOME/.genscriptrc' by giving
option `DownloadFont: name'.


* Tested Systems

Genscript have been tested on the following environments:

Name			Compilers
----------------------------------------------------------------------
AIX 3.2.5		gcc 2.7.0, cc 1.3.0.0		
AIX 4.1.x		gcc 2.7.2  xlc
HPUX			gcc
IRIX 5.3		gcc 2.6.3, cc			
Linux/Slackware 1.2.1	gcc 2.7.0			
NetBSD/Amiga 1.0	gcc 2.4.5
NeXT			cc
OSF/1 V3.2		gcc 2.6.3, cc			
SunOS 4.1.3		gcc 2.6.0			
SunOS 5.3		gcc 2.7.0		
SunOS 5.4
AmigaDOS/Amiga		gcc 2.7.0
Windows95/NT		MSC 2.00


* What's different as compared to the enscript application?

- Currently following enscript options are not supported:

    -k	enable page prefeed
    -K	disable page prefeed

- Enscript's option `-o' has been changed.  In enscript `-o' lists
  missing characters.  In genscript `-o' is an alias for `-p' and 
  missing characters are listed with an option `-O'.


* Misc

Comments, suggestions, bug fixes, bug reports, etc. are welcome.
Please, tell me what do you think about this software, I would really
like to hear your comments.


Markku Rossi 
	
	<mtr@iki.fi> <http://iki.fi/~mtr/>
