Program Description:

  This is an OS/2 2.0 port of the GNU GhostScript 2.5.2 with a Presentation
Manager driver (Version 2.4 by Jim Yang).  You may distribute this archive
only if you do not change the name of the archive: gspm24.

This version:

	1.  Adds a 256 color mode and a 16 gray scale mode, in addition to
	    the 4 gray scale mode of the 1.x PM driver.  You can use
	    the first two modes only if your system uses an OS/2 2.0 display
	    driver running in 256 color mode.  If your system is using an
	    OS/2 1.x display driver or is running in 16 color mode, you can
	    only get 4 gray levels.
	    Also, the speed of font rendering of the PM driver has been
	    improved in gspm24.

	2.  Can redraw properly after it has been minized or covered by
	    another window, and then exposed.  (See Known Problems below.)

	3.  Can accept character input from the drawing window (mainly used
	    to send carriage return to the GhostScript interpreter to go to
	    the next page), so that you can always keep the drawing window
	    in front.

	4.  Is compiled with the following drivers:
    	    os2pm epson eps9high bj10e deskjet djet500 laserjet ljetplus
	    ljet2p ljet3 cdeskjet cdjcolor cdjmono paintjet pjetxl gifmono
	    gif8 dfaxhigh dfaxlow. (Note that I have not tested any driver
	    other than os2pm, gifmono, and gif8.)

**********************  VERY IMPORTANT *************************************
This port of GhostScript was compiled with emx 0.8e, and requires the
following dll's:

	emx.dll      emxio.dll    emxlibc.dll

HOWEVER, THE EMXLIBC.DLL THAT COMES WITH EMX 0.8E CONTAINS A BUG IN FUNCTION
FREXP, WHICH PREVENTS GHOSTSCRIPT FROM BEING ABLE TO DISPLAY FONTS.  THE
EMXLIBC.DLL THAT COMES WITH THIS ARCHIVE IS A CORRECTED VERSION; THEREFORE
YOU MUST USE THIS DLL WITH GHOSTSCRIPT.  THIS APPLIES TO ALL THE DRIVERS
(PM, LASERJET, GIF8, ETC).

The author of emx has been notified of this bug.

As usual, put the dll's in a directory that's in your LIBPATH.
*****************************************************************************

To use the program:

	1.  Edit the file gsos2.cmd file.  Set the position of the drawing
	    window with the environment variable gsos2_pos.  Syntax:

		             gsos2_pos=X Y WIDTH HEIGHT,

	    where (X,Y) is the lower left corner of the window, and WIDTH and
	    HEIGHT are the width and height of the window, NOT including the
	    width and height of the window borders.  The values 352 2 442 572
	    are ok if you have a 800 x 600 display.  Also, set the environment
	    variable gs_lib to tell GhostScript were the initialization files
	    (gs_init.ps, gs_fonts.ps, etc) are.

	    Set the environment variable gsos2_dpi.  Syntax:

			gsos2_dpi=Xdpi Ydpi,

	    where Xdpi = WIDTH / (paper width in inches), and Ydpi = HEIGHT /
	    (paper height in inches).  For example, if you specify 442 as
 	    WIDTH and 572 as HEIGHT for gsos2_pos, and you want use the 
	    drawing window to preview 8.5 inch X 11 inch drawings, then
	    Xdpi = 442 / 8.5 = 52 and Ydpi = 572 / 11 = 52.  GhostScript
	    produce better results for halftone patterns (dithering) 
	    if you make Xdpi = Ydpi.

	    Set the environment variable gsos2_mode.  Syntax:

			gsos2_mode=N

	    where N = 1 for 256 color mode, N = 2 for 16 gray scale mode, and
	    N = 0 for 4 gray scale mode.

	2.  Type 'gsos2' from a windowed os2 session.  For example, type

		gsos2 "-sDEVICE=gif8"

	    to select the gif8 device.  Note the quotes around 
	    -sDEVICE=gif8.

To terminate the program: type 'quit' or double click on the ghost icon
on the upper left hand corner of the drawing window.

You can type commands when either the command window or the drawing window
has the input focus.  However, the drawing window accepts only simple
characters, including carriage return and backspace, but not characters
like tab.  The ability of the drawing window to take input is mainly
intended for passing carriage return to the GS interpreter in response to 
the "showpage, press <return> to continue" prompt, and for issusing simple
commands like "(tiger.ps) run".  Since the inputs to the command window and
inputs to the drawing window are maintained by differents threads with
different character buffers, you should finish typing a complete
line (punctuated by carriage return) before switching to the other window.
For example, you should not start typing a line into the command window, and
subsequently switch and type the rest of the line into the drawing window.


Optional:

	1.  Add a program object to one of your folders that points to the
	    file 'gsos2.cmd', and then attach the ghost.ico icon (included
	    with this archive) to the program object.  Then you can drag
	    and drop a PostScript file over the ghost icon and GS will
	    automatically display that file.

	2.  Edit the file "fontmap" so that GS uses the .pfb fonts in your
	    \psfonts directory.  For example, append the line

		/Helvetica                      (d:/psfonts/helv.pfb);

	    to the end of "fontmap", and GS will use d:/psfonts/helv.pfb
	    whenever it needs the Helvetica font.  Note: GS cannot read
	    the Times-Roman font in the \psfonts directory.

Remember, use forward slashes to separated directories - ie, use 
"(/apps/gs/tiger.ps) run" to preview the file 'tiger.ps'.


Known Problems:

1.  After applying the CSD, gspm24 locks up the command window after you
    exit the program if you run it from the command line.  This is a
    bug in the CSD.  Solution: create an icon for gsos2.cmd, and use the
    icon to start the program.

2.  When using the 256 color mode, some windows' colors are all wrong.  This
    is because these programs do not handle the WM_REALIZEPALETTE message
    correctly.  Solution: don't use these programs, or use the 16 gray scale
    mode of the gspm24.

3.  When using the 256 color mode, if a dialog box covers the drawing
    window and then is removed, the area under the dialog box contains the
    wrong colors.  This is a bug related to the palette management of OS/2.
    In short, PM redraws the area under the dialog box (or pull down menu),
    but draws it incorrectly when the physical palette has been changed.
    In contrast, the application is responsible for redrawing areas that
    where covered by other windows and then exposed.  Solution: minimize
    and then restore the drawing window.

4.  When using the 256 color mode, if you run another program that calls the
    WinRealizePalette function, or if you run a full screen dos program and
    then return to the OS/2 desktop, the drawing window no longer redraws
    with the correct colors.  This is because a) only the window that has the
    input focus will have its palette realized absolutely, and b) there is
    a bug in the function GpiBitBlt when using non-default physical palette.
    Solution: use the 16 gray scale mode of the gspm24.

5.  If you press return at the "GS>" prompt without typing anything else,
    GS exits with an error.  This is a bug in gspm24.  Solution: none.


My machine setup is:  486-33, 16MB RAM, 200MB HD (all HPFS), Diamond
Speedstar Hicolor (ET4000), 800 x 600 x 256 color desktop, November
CSD applied.

If you want to report a problem, include a detailed description of your
system.


--------------------------------------------------------------------------
Jim Yang
jyang@daedalus.caltech.edu


