History of Ghostscript versions 1.n

Table of contents

This document is a history of Ghostscript releases numbered 1.n. For more recent changes, see the the other history documents and, for the latest versions, the news:

News
History of Ghostscript versions 4.n
History of Ghostscript versions 3.n
History of Ghostscript versions 2.n
History of Ghostscript versions 1.n (this document)

For other information, see the Ghostscript overview.



Version 1.3 (6/20/89)

This release should have had a lot more things in it, but time pressure and the already long delay in getting it out made it necessary to push it out the door in an incomplete state (e.g., no testing on X systems whatsoever).

Interpreter

Makes -d and -D equivalent on the command line. Adds a new switch -s / -S that defines a name as a string rather than a token. Arranges things so that if -sLIB=_a_prefix_ is defined on the command line, (filename) run will look for _a_prefix_filename before giving up if filename isn't the name of an accessible file. Changes showpage from an operator to a procedure. The definition of showpage in ghost.ps does a copypage, beeps the console, waits for the user to type a character (normally a <return>, since line buffering is always enabled), and then does an erasepage and an initgraphics. Adds a new initialization file, gdevs.ps, containing device-dependent parameters. The default window size for X Windows is properly set to 612 x 792, i.e., 8.5" x 11". Adds a new optional initialization file, statusd.ps, that provides dummy definitions for the names found in statusdict on LaserWriters. Adds a new operator, getenv, to get information from the shell environment. Adds a new predefined operator, defaultdevicename, that returns either (X) or (EGA) according to how the interpreter was built. Adds a new type, devicetype, and new operators deviceparams, getscanlines, makedevice, makeimagedevice, and setdevice. Changes currentdevice to return a device object rather than a set of parameters. Makes the scanner recognize reals with 'e' exponent notation, and handle reals with more than 9 digits. Fixes a bug that made names starting with digits read incorrectly. Fixes a bug in the exp operator that made it not pop its first argument from the stack. Fixes a bug in the rand operator that made it return negative values about half the time. Fixes a bug in equality comparison (eq, ne, and several other operators) that made unequal operator objects occasionally appear to be equal on DOS systems. Fixes a bug in the bind operator that made it not work on packed arrays. Changes the internal representation of dictionaries so they can be expanded or contracted dynamically. Adds a new operator, setmaxlength, to change the allocated size of a dictionary. Changes sstorei.h so that non-DOS compilers don't encounter the #pragma directive used by Turbo C. Restores the display mode (on MS-DOS systems) when exiting.

Fonts

Makes undefined characters in the standard font display as tilde rather than blank (or causing an error). Unmapped character codes (those mapped to .notdef in the encoding) still display as nothing, per the PostScript manual.

Library

Adds a new header file, gxbitmap.h, with some new documentation describing the internal storage format for bitmaps. Makes numerous internal changes in the character / font cache, affecting many of the routines in gxcache.c. Fixes a bug in gz_draw_line / gz_fill_trapezoid that made nearly horizontal lines display wrong. Fixes a bug in gs_scale that made scaling not work if the coordinate system was rotated or skewed. Extends the font cache so it will handle characters rotated by multiples of 90 degrees. Changes the second argument of gx_path_bbox and gx_path_is_rectangle to be a gs_fixed_rect * rather than a fixed [4]. Changes gs_matrix_rotate so it handles multiples of 90 degrees as a special case. Changes the definition of the gx_device structure to accommodate the new device operators, and adds corresponding library calls. Changes the type for a device color index from int to gx_color_index (equivalent to unsigned long). ***NOTE***: this affects existing clients and drivers in a non-trivial way on MS-DOS systems. Changes gs_malloc and gs_free to take a client name string as an argument.

Usage procedures

Changes the compilation rules for Unix systems to not use the -o and -c compiler flags together, to be compatible with more versions of cc. Changes the gcc makefile to use $(GCC) rather than gcc as the compiler name. Moves the -1 flag for the MS-DOS compiler from the cc*.bat files to the makefile. Changes CCDEBUG to CCFLAGS, and adds ASMFLAGS, in DOS makefile. Adds -DFOR80386 and /DFOR80386 to enable use of 80386 instructions in assembly code on DOS systems. Merges the DEBUG and gs_DEBUG switches. There is now only a single DEBUG switch that affects both the interpreter and the library. Adds a new compilation switch, -DNOPRIVATE, that makes private (static) variables and procedures public for debugging and profiling (only needed on DOS systems). Adds the DOS executable (gs.exe and gs.map) to the distribution fileset. Adds new platform-specific code files, gp-*.c, for a few things like reading the clock. Adds a new documentation file, drivers.doc, that describes the interface between Ghostscript and device drivers.

Version 1.2 (2/22/89)

Interpreter

Adds the new facilities in version 25 of PostScript: //name for immediate lookup, packed arrays (setpacking, currentpacking, packedarray operators), and new font cache parameters (setcacheparams, currentcacheparams operators). Adds new operators (setfileposition, currentfileposition) for random access to files. Extends readhexstring to take either a string or a file, just like token. Fixes a bug that caused the 'for' operator (and a couple of others) to randomly smash memory locat of these until it works on your system) - consists of the following files... hershey.doc - details of the font data format, typestyles and symbols included, etc. hersh.oc[1-4] - The Occidental font data (these files can be catenated into one large database) hersh.or[1-4] - The Oriental font data (likewise here) *.hmp - Occidental font map files. Each file is a translation table from Hershey glyph numbers to ASCII sequence for a particular typestyle. hershey.f77 - A fortran program that reads and displays all of the glyphs in a Hershey font file. hershey.c - The same, in C, using GKS, for MS-DOS and the PC-Color Graphics Adaptor. Additional Work To Be Done (volunteers welcome!): - Integrate this complete set of data with the hershey font typesetting program recently distributed to mod.sources - Come up with an integrated data structure and supporting routines that make use of the ASCII translation tables - Digitize additional characters for the few places where non-ideal symbol substitutions were made in the ASCII translation tables. - Make a version of the demo program (hershey.c or hershey.f77) that uses the standard Un*x plot routines. - Write a banner-style program using Hershey Fonts for input and non-graphic terminals or printers for output. - Anything else you'd like! This file provides a brief description of the contents of the Occidental Hershey Font Files. For a complete listing of the fonts in hard copy, order NBS Special Publication 424, "A contribution to computer typesetting techniques: Tables of Coordinates for Hershey's Repertory of Occidental Type Fonts and Graphic Symbols". You can get it from NTIS (phone number is +1 703 487 4763) for less than twenty dollars US. Basic Glyph (symbol) data: hersh.oc1 - numbers 1 to 1199 hersh.oc2 - numbers 1200 to 2499 hersh.oc3 - numbers 2500 to 3199 hersh.oc4 - numbers 3200 to 3999 These four files contain approximately 19 different fonts in the A-Z alphabet plus greek and cyrillic, along with hundreds of special symbols, described generically below. There are also four files of Oriental fonts (hersh.or[1-4]). These files contain symbols from three Japanese alphabets (Kanji, Hiragana, and Katakana). It is unknown what other symbols may be contained therein, nor is it known what order the symbols are in (I don't know Japanese!). Back to the Occidental files: Fonts: Roman: Plain, Simplex, Duplex, Complex Small, Complex, Triplex Italic: Complex Small, Complex, Triplex Script: Simplex, Complex Gothic: German, English, Italian Greek: Plain, Simplex, Complex Small, Complex Cyrillic: Complex Symbols: Mathematical (227-229,232,727-779,732,737-740,1227-1270,2227-2270, 1294-1412,2294-2295,2401-2412) Daggers (for footnotes, etc) (1276-1279, 2276-2279) Astronomical (1281-1293,2281-2293) Astrological (2301-2312) Musical (2317-2382) Typesetting (ffl,fl,fi sorts of things) (miscellaneous places) Miscellaneous (mostly in 741-909, but also elsewhere): - Playing card suits - Meteorology - Graphics (lines, curves) - Electrical - Geometric (shapes) - Cartographic - Naval - Agricultural - Highways - Etc... ASCII sequence translation files: The Hershey glyphs, while in a particular order, are not in an ASCII sequence. I have provided translation files that give the sequence of glyph numbers that will most closely approximate the ASCII printing sequence (from space through ~, with the degree circle tacked on at the end) for each of the above fonts: File names are made up of fffffftt.hmp, where ffffff is the font style, one of: roman Roman greek Greek italic Italic script Script cyril Cyrillic (some characters not placed in the ASCII sequence) gothgr Gothic German gothgb Gothic English gothit Gothic Italian and tt is the font type, one of: p Plain (very small, no lower case) s Simplex (plain, normal size, no serifs) d Duplex (normal size, no serifs, doubled lines) c Complex (normal size, serifs, doubled lines) t Triplex (normal size, serifs, tripled lines) cs Complex Small (Complex, smaller than normal size) The three sizes are coded with particular base line (bottom of a capital letter) and cap line (top of a capital letter) values for 'y': Size Base Line Cap Line Very Small -5 +4 Small -6 +7 Normal -9 +12 (Note: some glyphs in the 'Very Small' fonts are actually 'Small') The top line and bottom line, which are normally used to define vertical spacing, are not given. Maybe somebody can determine appropriate values for these! The left line and right line, which are used to define horizontal spacing, are provided with each character in the database. Format of Hershey glyphs: 5 bytes - glyphnumber 3 bytes - length of data length in 16-bit words including left&right numbers 1 byte - x value of left margin 1 byte - x value of right margin (length*2)-2 bytes - stroke data left&right margins and stroke data are biased by the value of the letter 'R' Subtract the letter 'R' to get the data. e.g. if the data byte is 'R', the data is 0 if the data byte is 'T', the data is