Organization: MCC, MIS/Telecomm
Mail-System-Version: <VAX-MM(312)+TOPSLIB(155)+PMDF(4.1)@Maximillion.mcc.com>
X-Phone: (512) 338-3316
X-FAX: (512) 338-3888
Newsgroups: bit.listserv.sas-l
Date:         Sun, 13 Sep 1992 15:17:43 -0500
Reply-To:     Bob Paver <PAVER@MAXIMILLION.MCC.COM>
From:         Bob Paver <PAVER@MAXIMILLION.MCC.COM>
Subject:      FORMCHAR, TABULATE, and PostScript
Comments: To: sas-l@OHSTVMA.ACS.OHIO-STATE.EDU
Comments: cc: rikard@vcuucc.ucc.vcu.edu, gibes@swirl.monsanto.com,
              bemery@DANTE.NMSU.EDU, JAMES@UCRAC1.UCR.EDU

Content: TABULATE FORMCHAR for PostScript
Summary: Line drawing characters from TABULATE via PostScript
Release and platform: All
Name: Bob Paver
Mail addresses: paver@mcc.com
Real Addresses: MCC
                3500 W Balcones Center Drive, Austin, TX 78759
                Phone (512) 338-3316    FAX: (512) 388-3888


"Attached" is an updated version of a message I sent to SAS-L in
October '91. Since then there have been a number of queries about
the use of line drawing characters in TABULATE-produced tables.

Peter Rikard of VCU (rikard@vcuucc.ucc.vcu.edu) has previously
volunteered to collect the FORMCHAR= strings that people use to
produce "pretty" lines. I am sending him a copy of my solution
for his archive and encourage others to do so. We should be able
to accumulate solutions for most common printers and operating
systems without too much effort.

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Bob Paver  ---->  paver@mcc.com

Microelectronics and Computer Technology Corp (MCC)
3500 West Balcones Center Drive
Austin, Texas 78759-6509             (512) 338-3316




              TABULATE, Line Drawing and PostScript

                            Bob Paver
                               MCC
                         September 1992

This document presents one solution for generating line-drawing
characters on a PostScript printer. The solution could be
generalized to non-PostScript printers and non-VMS operating
systems. Surely HP LaserJet printers have a font with the line
drawing characters.  Most laser printers that I have worked with
have some capability to add font definitions through cartridges
(ala HP) or by downloading.

This solution was the direct result of e-mail and a phone call from
Capt. Erik Nielsen (Brooks Air Force Base) who pointed me to a soft
font called "DOSfont."  This font is distributed with QMS
PostScript printers and may be included with other brands. I dug
out some floppies that came with our QMS printer and sure enough, I
found DOSfont!

DOSfont includes the line drawing characters that are used on
PC's and they work just fine for SAS output as well. The
other characters in DOSfont look very much like Adobe
PostScript Courier and are fixed width as is Courier.

ENVIRONMENTAL DISCLOSURE:

  SAS 6.06
  VMS 5.3-1
  QMS PS800-II printer
  PacerPrint print symbiont controlling printer


WHAT I DID:

To use this font, I went through the following steps.

+ Uploaded the PostScript code that defines the font to our VAX.
  I made some changes to the PostScript to shorten the lines
  (makes the print symbiont happy) and to include the appropriate
  "exitserver" stuff.  (I think there is a QMS-provided utility
  for the PC that prepends the "exitserver" stuff when working in
  that environment.)

+ I then sent this font definition to my PostScript printer,
  loading the font into the printer's RAM where it stays until the
  printer is reset or powered off. How one gets this file into
  the printer is probably site-specific.  I was able to do it
  with a simple PRINT command because the PacerPrint symbiont is
  reasonably intelligent about such things.

+ Added the following to the OPTIONS statement in my SAS job
  that produces the tables:

                    formchar='B3C4DAC2BFC3C5B4C0C1D9'x

  This option specifies which DOSfont characters to use for
  the corners, intersections, vertical lines, etc.  See the
  documentation for PROC CALENDAR.  It's more detailed than
  the description for PROC TABULATE.

+ Ran the SAS job to produce an output file. The table borders
  are built using the characters defined via FORMCHAR=. By the
  way, these are 8-bit characters and are not "normally" defined.
  If you display this file at your terminal or send it to the
  printer, you'll probably get some funny looking character at
  each "line drawing" position.  Beware of printer symbionts and
  data paths that might not pass 8-bit characters.

+ Post-processed the output file using a public-domain program
  called LPSCR. LPSCR reads an ASCII file and "wraps" it in
  PostScript code, allowing me to specify the font (DOSfont),
  point size (8), line spacing (9 point), and rotation
  (landscape). The line spacing is important. If it's too large
  the tops and bottoms of the vertical bars do not meet.

  There are other programs that perform the functions that LPSCR
  does. One called PS comes to mind. This post-processing is an
  important step as this is where I tell the printer which font
  to use. It is possible that on some systems the font could be
  specified at the time the job is printed, perhaps as a command
  line option.

+ Sent the resulting PostScript to the printer and it works
  great!

Many thanks to Erik for the e-mail messages and the phone
call. Thanks also to Derek Morgan (Washington University) who
provided helpful information and encouragement.

DOSfont is copyrighted by Tangent Technologies, Ltd. so I can't
post it to the net. There may be public domain fonts that will do
the same thing. I would start looking in some of the PC or
PostScript archives. QMS sells their utilities through:

    Laser Connection, Inc.
    PO Box 850296
    Mobile, AL 36685
    USA

    (800) 523-2696
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU