[comp.lang.postscript] Bug fix for Transcript on Ultrix DecStations

snichols@adobe.com (Sherri Nichols) (08/10/90)

We recently discovered that troff on DecStations running Ultrix has been
modified to require ascii font widths files instead of the more traditional
binary font widths files.  The same is true of MIPS workstations.  This
means that the troff to PostScript translation feature of TranScript (the
ptroff command) no longer works.  Thanks to Phil Farrell of Stanford, we
have a patch to fix this bug.  The patch follows.  Any questions regarding
this patch should be directed to me, not Phil.

Sorry for any inconvenience.

Sherri Nichols
Adobe Systems, Inc.
snichols@adobe.com

--------cut here-----------
*** config.bsd	Mon Jul  9 14:52:26 1990
--- config.bsd.old	Mon Jul  9 14:25:58 1990
***************
*** 134,170 ****
  #	take up quite a bit of disk space.  See below.
  TROFFFONTS=1
  
- # TROFFASCIIFONTS
- #	Assuming TROFFFONTS=1, so troff (otroff) fonts will be built,
- #	the TROFFASCIIFONTS flag controls the format of those font tables.
- #	RISC ULTRIX 3.1C from Digital Equipment has changed the font 
- #	width table format for old troff.  Instead of
- #	a binary table in "a.out" format, it wants a simple ASCII file.
- #	This file has 224 lines, each containing a single decimal 
- #	integer value.  The lines correspond to the 256 possible 8-bit
- #	ASCII character codes, in ascending order, excluding the first 
- #	32 codes (0-31 decimal)	that contain non-printing characters.  
- #	Special symbols go into codes 128-255 (8th bit on).  The decimal
- #	integer on each line is the width of the character corresponding
- #	to the code position represented by that line, in "C.A.T." 
- #	phototypesetter units.  The largest value in these units seems
- #	to be < 40.  This decimal width value is increased by the value
- #	64 if the character to which it applies has a descender;
- #	increased by the value 128 if the character has an ascender; or
- #	increased by the value 192 if the character has both ascender 
- #	and descender.  For example, the first ASCII character of interest
- #	is the space (decimal code 32 or octal 40).  Its width value 
- #	is on the first line of the ASCII format font width table and
- #	happens to be 12.  The ASCII character "0" (zero) is represented
- #	on the 17th line of the font width table.  Its width value is 18,
- #	but it has an ascender, so that value is increased by 128 to 146.
- #	If you are installing TranScript on a RISC ULTRIX system or 
- #	other system using this ASCII font width table format (none other
- #	known as of July 1990), then set the TROFFASCIIFONTS flag = 1.
- #	For the traditional binary font width table format, set the
- #	TROFFASCIIFONTS flag = 0.
- TROFFASCIIFONTS=0
- 
  # FONTFAMILIES
  #	List of the troff/ditroff font families to install.  This sets
  #	up the fonts that will be available in troff/ditroff.  Any font
--- 134,139 ----
***************
*** 223,227 ****
  
  export BINDIR PSLIBDIR PSTEMPDIR TROFFFONTDIR DITDIR MAKEDEV REVERSE \
         MAN1 MAN7 MAN8 VERBOSELOG BANNERFIRST BANNERLAST OWNER GROUP \
!        SETCFLAGS DITROFFFONTS TROFFFONTS TROFFASCIIFONTS \
!        FONTFAMILIES DITROFFDIRS PATH
--- 192,195 ----
  
  export BINDIR PSLIBDIR PSTEMPDIR TROFFFONTDIR DITDIR MAKEDEV REVERSE \
         MAN1 MAN7 MAN8 VERBOSELOG BANNERFIRST BANNERLAST OWNER GROUP \
!        SETCFLAGS DITROFFFONTS TROFFFONTS FONTFAMILIES DITROFFDIRS PATH


*** lib/troff.font/makefontdir.bsd	Mon Jul  9 14:39:10 1990
--- lib/troff.font/makefontdir.bsd.old	Mon Jul  9 14:29:42 1990
***************
*** 2,19 ****
  #! /bin/sh
  # lib/troff.font/makefontdir
  #
  # Copyright (c) 1987 Adobe Systems Incorporated. All Rights Reserved.
  # GOVERNMENT END USERS: See notice of rights in Notice file in release directory.
  # RCSID: $Header: makefontdir.bsd,v 2.2 87/11/17 16:29:46 byron Rel $
- # 9 July 1990 - Phil Farrell - Stanford Earth Sciences
- #	Revised so that if TROFFASCIIFONTS flag is defined, an ASCII
- #	format font will be created instead of the traditional binary
- #	"a.out" format.  See the documentation of this flag in 
- #	the "config.bsd" file in main TranScript source directory
- #	for further information.
  
  # This script moves the font files for a font family into a target
  # directory.  It also make some links.  It is used to create [o]troff
  # font family directories.
  # Font family directories are always created in the current directory.
  
--- 2,13 ----
***************
*** 27,47 ****
  set $1 `awk -f doto.awk $family.map`
  
  # This creates the font files from the .c files.
  # If you want to be able to check the ".c" files, remove the "rm" line.
  for file in $2 $3 $4 $5
  do
-      if test "$TROFFASCIIFONTS" = 1 
-      then
-  	awk -F, '/^[0-9]/ {print $1}' $file.c |\
-  	    awk -F+ '{$1=$1+($2/100)*64; print $1}' > $file
-      else
  	cc -c $file.c
  	mv $file.o $file
  	strip $file
-       fi
  	rm $file.c
  done
  
  # Get the overhead files
  mv $family.ct $target/font.ct
  cp font.head $target
--- 21,35 ----
-----------cut here-----------