[fa.laser-lovers] Please post this to the laser-lovers mailing list.

laser-lovers@uw-beaver (05/01/85)

From: allegra!sjuvax!bbanerje@seismo.ARPA (B. Banerjee)

Hi,

     I need  some  advice  on  Typesetting  terminology  and
hardware.   I  was  hoping that some readers of this mailing
list would be able to help  me.   I  would  welcome  all/any
help.   Please  reply  by mail as the medium through which I
receive this  list  (fa.laser-lovers)  is  pretty  sporadic.
Should demand warrant it, I will summarise to the list.

Background

     Our site is a University running 4.2  BSD  on   a  VAX.
The  limited experience with Text Processing that we have is
through the use of 'nroff' with typewriter style devices.

     Very recently we acquired a DEC LN03, their new  table-
top  Laser  Printer.   Almost  concurrently, we received the
latest release of TeX for Unix from the University of  Wash-
ington.   The problem is to make the two talk to each other.
I have some confusion in regard  to  several  aspects  which
I'll try and present logically.

TeX

     I don't have a great deal of questions  regarding  this
as  yet.   The  problem  is that I would like to look at the
code for certain things (dvitype and  the  like)  which  are
presently  'web'  files.  Unfortunately, till I get the LN03
driver working, I can't typeset the *.tex files generated by
'weave'.  The Pascal code generated by tangle is unreadable,
even when processed by a prettyprinter.   So,  the  question
is...  Is  there  any way of getting formatted output of TeX
files on a typewriter style device (analogous to  nroff  and
troff) ?

Terminology & Confusion

     As I understand it, a font is a set of printable  char-
acters in a certain size and style.  There is also an impli-
cit mapping between an ascending numeric sequence, and  each
of  the glyphs in the font.  Now, the LN03 supposedly has 32
fonts in ROM when powered up.  Yet the status sheet  printed
out  shows that some of them look just like others.  Is this
the way it should be?   The  other  problem  is  that  (from
Appendix  C.  of  the TeXbook), TeX seems to make use of all
128 7 bit ASCII codes.  The LN03 only allows 96 of the ASCII
codes  to be printable.  Is there any way to map the charac-
ters in a font among 2 or more hardware character sets?  I'm
sure  that  other printers have equally bizarre font assign-
ments that must be adhered to.

     In general, is it possible to use TeX  with  a  printer
that  only  has fonts in ROM?  I would imagine that it would
be possible to map the Typewriter font of TeX into the fixed
width   hardware   characters  present  on  practically  all
printers.

The LN03

     Here is where most of my questions come in.  The manual
that  came  with  the LN03 is a preliminary document, and is
about as clear as mud.

     The flier that our DEC sales rep. gave us when we  were
considering the purchase of a Laser Printer said (I quote)..

     "Font file format will be made public so that users can
     design  their  own  fonts.   This  format  is currently
     planned for  use  by  future  Digital  Laser  Printers.
     (THEREFORE, LN01 FONTS CANNOT BE USED ON THE LN03)"

Sounds promising?  From the same document...

     "PSG will also offer 128 KB RAM cartridges which can be
     plugged  into  these  receptacles  to expand the LN03's
     resident memory for accepting fonts or forms which  are
     downline   loaded   from   a  host.   With  appropriate
     software, the LN03 can manage and print up to 24  fonts
     on a page."

Therefore, I eagerly opened the manual to find the following
information.

     "The printer is shipped with 32 fonts in ROM:  24  por-
     trait  and  8  landscape....  In  addition  to  the ROM
     resident fonts, up to 31 other mono-spaced and  propor-
     tional  fonts  (based on memory limits) can be downline
     loaded from the host computer and stored in RAM...

     The printer supports 14 character sets that are  either
     resident or dowline loaded from the host...

Now, I am  thoroughly  confused.   What  is  the  difference
between  a font and a character set (as in the context given
above), and why are the numbers different.  These  two  fig-
ures  are given within a few lines of each other, so I can't
attribute it to an oversight.  Meanwhile, back at the  ranch
(later on in the document...)

     "A font file is a font for a single  specified  graphic
     character  set,  and so contains 94, 96, 94*94=8836, or
     96*96=9216 character images called 'glyphs'.

Huh?  I can see the rationale for 94 or 96.... But what if I
just  want  128  glyphs in my font (for TeX).  Must I define
null positions for the remaining 8836-128?  How do I  encode
each of these?  Also, the following...

     The font record is in DEC font file  format,  and  con-
     sists  of binary data which has been converted to sixel
     format as described in Appendix D.

     Fine, now that is the crux  of  the  problem.   Nowhere
does  it  state *WHAT* DEC font file format is.  They give a
description of how to go from  binary  data  to  sixels.   I
presume  that the binary data consists of a bitmap raster of
the character encoded in some way. If so, *HOW*?

     Other confusing information imparted states that  "..In
the  LN03,  RAM  is used for page composition buffer and for
font storage".  Well, evidently they don't store  an  entire
bitmap  image  of the page, but how much do they use for the
page composition buffer, and how much pure font  storage  is
available?

Conclusion

     Thanks for bearing through with this till the  end.   I
would  appreciate  some  advice on how to write a driver for
this creature.  Commercial fonts aren't a viable alternative
since  we  have  enough  money for a grilled cheese sandwich
(and perhaps a coke) remaining in our budget.  Essentially I
think  that I could modify the LN01 driver included with the
TeX distribution if I knew how  to  go  about  encoding  the
fonts,  and finding out how much pure font memory was avail-
able.

     On the other hand, if someone has already done  this...
I'm  not  proud.   Basically,  I  want to use the printer as
something other than a quiet dumb line printer.

     In order to forestall  a  possible  suggestion...  page
composition  on  our  main  machine,  and downloading to the
Printer via sixel graphics is not a viable alternative.  Our
system  slows to a crawl when assignments are due, and down-
loading a page in sixels would take  forever.   Also,  sixel
graphics  only give us 150 dpi.nly give us 150 dpi.  I want to take advantage of
the full 300 dpi resolution.

Regards,

                                Binayak Banerjee
                {allegra | astrovax | bpa | burdvax}!sjuvax!bbanerje

[[Editor's note:  If any of you have already written an LN03 TeX
driver for Berkeley Unix, let me know too.  I'd like to put it onto
the Unix TeX distribution tape.

We haven't seen much discussion on the LN03 here---this note raises
some matters that could be discussed further.  On the other hand, it
also raises some questions that have been answered before.
Consequently, I'll take a first crack at answering some of the
questions:

Whether or not you can drive a typewriter-like device with TeX has
been a matter of much discussion.  At the present, I'd say the answer
is "no."  To handle the immediate problem, however, I believe that you
can purchase TeXware listings for $8 from Maria Code/DP Services/1371
Sydney Dr./Sunnyvale, CA 94087/(408) 735-8006 (9:30 am to 2:30 pm,
West Coast time).  The TeX listing, itself, has been published by
Addison-Wesley and should be obtainable from a bookstore.

The second question was whether you can use ROM-supplied fonts with
TeX.  If you can build TeX TFM files describing your ROM fonts, you
should be able be able to use them if your DVI device driver
understands what you're trying to do.

Thirdly, the question was how to map TeX's 128 position fonts into the
RAM fonts provided by the LN03.  One way might be to one of the 8836
glyph fonts to hold *all* of the TeX fonts (or at least 69 of them)
and map the TeX fonts into character positions within the RAM font in
the DVI device driver.

					--Rick  ]]