barrett@jhunix.HCF.JHU.EDU (Dan Barrett) (07/27/90)
I can't get troff to work under Ultrix 3.1D or 4.0. All I ever get is this error message: $ troff -t -F/usr/local/troff/ftX /usr/local/troff/tmac.vcat \ myfile.tr | lpr -Pprinter Null or non-ASCII character in font file /usr/local/troff/try/ftR $ I tried using the fonts in /usr/lib/font as well, with no success. Any help appreciated. Dan //////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ | Dan Barrett, Department of Computer Science Johns Hopkins University | | INTERNET: barrett@cs.jhu.edu | | | COMPUSERVE: >internet:barrett@cs.jhu.edu | UUCP: barrett@jhunix.UUCP | \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////////////
farhad@sunburn.stanford.edu (Farhad Shakeri) (07/28/90)
In article barrett@jhunix.HCF.JHU.EDU (Dan Barrett) writes: |> |> I can't get troff to work under Ultrix 3.1D or 4.0. All I ever |>get is this error message: |> |> $ troff -t -F/usr/local/troff/ftX /usr/local/troff/tmac.vcat \ |> myfile.tr | lpr -Pprinter |> Null or non-ASCII character in font file /usr/local/troff/try/ftR |> $ |> |>I tried using the fonts in /usr/lib/font as well, with no success. Any |>help appreciated. |> |> Dan I do not have any of these versions, so I am gussing: Do: file /usr/lib/font/* and see if they are still VAX binaries! If they are still VAX binaries then DEC has not fixed the troff fonts problems YET. I have been on this case for a long time with them and the only thing I got was empty promises. So I gave up. Here is a message We got lately from another group withing Stanford This is without his permision but seems very usefull: ------------------------------------------------------------------ From: farrell@pangea.Stanford.EDU (Phil Farrell) Subject: RISC ULTRIX troff/TranScript bug and fix DECstation and DECsystem owners please note. Shirley, please update TranScript sources on alleyn with this fix. The troff typesetting program distributed with RISC ULTRIX 3.1C (and probably other releases of version 3.0 or later) will not work with the standard LaserWriter font width tables produced by the TranScript software package (available from alleyn anonymous ftp server). The problem is that Digital Equipment modified troff to expect an ASCII input format, when for the last dozen years every other system, and third-party software packages like TranScript, have used a binary format. Of course, Digital did not describe this new format in the ULTRIX documentation. Nor would their technical support tell me what it was ("troff" is an unsupported program in ULTRIX - they want you to shell out money to buy "ditroff"). Even the alternative font tables that Digital shipped with ULTRIX (not for the LaserWriter, but for obsolete devices) were in the wrong format! Anyway, I only wasted about two days of my time determining this new format and making two simple changes to the TranScript software package to support it. You will want to apply these patches if you intend to use troff with Apple LaserWriters on RISC ULTRIX systems. Basically, I defined a new flag TROFFASCIIFONTS in the configuration file ./config, which should be set equal to "1" if you want the new ASCII format for troff font width tables; or anything else to get the traditional binary format. I then modified the ./lib/troff.font/makefontdir script that actually creates the final tables to do the appropriate thing depending upon this variable setting. Use patch to apply the context diffs below in the transcript source directory. I have made other minor changes to my copy of the config file, so your line numbers may vary. Note that these diffs apply to the "master" *.bsd versions of these files; this suffix may have been dropped in your source directory if you have already tried to make TranScript. Also, please note that the default setting of TROFFASCIIFONTS in these diffs is OFF - this way, you can apply these diffs to your source without changing its behavior on other machines. Before making TranScript on your DECstation or DECsystem, reset TROFFASCIIFONTS equal to "1" in ./config. -Phil Farrell, School of Earth Sciences Computer Systems Manager farrell@pangea.stanford.edu 3-9575 -----cut here----- *** config.bsd Mon Jul 9 14:52:26 1990 --- config.bsd.old Mon Jul 9 14:25:58 1990 *************** *** 140,176 **** # 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 --- 140,145 ---- *************** *** 229,233 **** export BINDIR PSLIBDIR PSTEMPDIR TROFFFONTDIR DITDIR MAKEDEV REVERSE \ MAN1 MAN7 MAN8 VERBOSELOG BANNERFIRST BANNERLAST OWNER GROUP \ ! SETCFLAGS DITROFFFONTS TROFFFONTS TROFFASCIIFONTS \ ! FONTFAMILIES DITROFFDIRS PATH --- 198,201 ---- 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 *************** *** 4,15 **** # 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 --- 4,9 ---- *************** *** 29,43 **** # 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 --- 23,31 ---- -----cut here----- -- +----------------------------------------------------+ / Farhad Shakeri E-Mail: / / Stanford University farhad@Tehran.Stanford.EDU / / Computer Science Dept. /
steve@fnord.umiacs.umd.edu (Steve D. Miller) (08/06/90)
Interesting. This fix is the one I wanted to use, but I couldn't figure out the format of the ASCII font width tables without sources, and our sources hadn't yet arrived, so... My approach was to punt the Ultrix troff, replacing it with the BSD version, plus some really important bug fixes. I then hacked some Makefiles in TranScript to run a COFF-to-a.out mangler I wrote (which is sufficient only for font width tables, folks, since they don't have to look like real binaries). Once I did all that, we could troff just fine. After I had things working, my motivation to change my fix dropped dramatically; I'd really rather do almost anything than work on text processing software, and if I have to work on text processing software, I'd really rather work on almost anything other than troff. In any case, if you'd like, anonymous FTP to fnord.umiacs.umd.edu and grab the files psfixfont.c and trofffix.shar from /pub. The former is the COFF->a.out font width table converter, and the latter is the required set of fixes to the 4.3BSD troff that will make it run on a DECstation. Actually, DEC didn't modify the font width table format -- the DECstation Ultrix troff sources all say, 'copyright MIPS Computer Systems' on them. I suspect that MIPS modified the format, though perhaps someone else (AT&T?) did so even before they did. I tried really hard (two or three times!) to get RISC troff fixed during the 4.0 field test, and failed miserably. Argh. -Steve -- Spoken: Steve Miller Domain: steve@umiacs.umd.edu UUCP: uunet!mimsy!steve Phone: +1-301-454-1808 USPS: UMIACS, Univ. of Maryland, College Park, MD 20742 New phone (August 6thish, 1990): (301) 405-6736