The Scheme Underground is pleased to announce that Functional
PostScript, release 1.0, is now available for Internet retrieval.
FPS is a portable system for doing device-independent, resolution-
independent graphics from Scheme programs. It is PostScript, with
the Forth computational engine replaced with Scheme.
FPS is tightly based upon PostScript. It uses *exactly* the PostScript
base rendering primitives. For example, it understands PostScript AFM
files, and can render text using general PostScript fonts.
The design of FPS centers on two basic data structures: paths and
pictures. A path is an invisible, ideal geometric path on a plane.
A picture is a description of ink on paper. Paths can be scaled,
rotated, translated, and composed, creating new paths. Filling or
stroking a path creates a picture. Pictures can also be scaled,
rotated, translated, clipped, recolored, and composed, creating
new pictures. The system is fully functional and free of side
effects. The single side effect available to the user is rendering
a picture to an output device. PostScript fonts are supported for
generating paths and pictures from text.
The system is not a "toy". The full set of PostScript rendering
primitives are provided: lines, curves, arcs, glyphs, and bitmaps.
Full control is provided of the rendering engine's style parameters,
such as line width and cap style. Interchangeable RGB, CMYK, and HSB
color models are provided.
The current release of FPS renders pictures to any Scheme port as
a stream of straight-line, DSC-compliant PostScript text which can
be submitted to any PostScript printer or viewed with ghostview.
The renderer can generate EPS text if desired. The actual rendering
is done on the printer, for accuracy and efficiency (the system has
been carefully designed to allow for this phase-distinction between
picture construction and rendering).
Interested hackers have already implemented alternate FPS channels
that back-end out to Display PostScript libraries, allowing FPS
programs to render directly to X windows. These back-ends, however,
are far from ready for release at this time.
It is also an obvious and interesting question to consider using
FPS as an interactive window system ...
FPS runs on top of Scheme 48, a portable, byte-code implementation
of Scheme, but has been designed to be simple to port to other
Scheme. As released, the code also has one or two dependencies on
Scheme shell scsh (it uses scsh's process environment accessors to
get an $AFMPATH, which provides the search path for the parsers that
read in AFM files). However, please note that the system is heavily
commented, written for clarity, not overly large or complex, and
should be easy to hack or port.
The current release has at least three lacunae: we do not currently
support PostScript patterned fills, text kerning, or huge, CID
fonts (such as Chinese).
The system comes with generally readable, ASCII-format documentation
and some example pictures in FPS and rendered PostScript format.
The current release can be retrieved from
The get scsh, go to
This is FPS's first release. We welcome suggestions, bug reports,
comments, and hacks. If you do anything beautiful with FPS, send
us the picture (in FPS form, of course)!
-Wandy Sae-Tan <email@example.com>
-Olin Shivers <firstname.lastname@example.org>