[comp.lang.postscript] PostScript font downloading query

peter@memex.co.uk (Peter Ilieve) (07/11/88)

Does anyone know how to download an Adobe PostScript font from a Unix
machine?

Adobe only seem to sell fonts in Mac or PC format. I want to store the
font on one of our Unix machines and download it from there, as part
of a "TeX using PostScript fonts" system. I know that the font must be a
PostScript program and as I thought that the PC files would be easier
to understand than the Mac I bought a PC font.

The printer font file does look like PostScript but it has 8 non-ascii
bytes at the start, before the "%!PS-AdobeFont-1.0" and the bulk of it
is non-ascii stuff after a "currentfile eexec". The file ends with 8 lines
of 64 "0"s follwed by "cleartomark {restore} if".

The eexec operator does not seem to be documented anywhere. The only
other use I have seen is in the LaserPrep file from the Mac, where
the "currentfile eexec" is followed by ascii hex digits and seems to
ignore newlines, like "readhexstring".

If I carefully edit the file, preserving the non-ascii stuff after the
eexec but removing the 8 bytes at the start and send this to the
printer (a LaserWriter) it complains:
%%[ Error: undefined; OffendingCommand: ^[t^KvL^L^Meb^?b ]%%
presumably choking on some of the non-ascii stuff.

What am I doing wrong and how do I do it right?
Ideally Adobe would respond by saying they will supply fonts on 1/2 inch
mag tape like they said they would in my old ring-bound PostScript Font
Manual.

Peter Ilieve				Memex Information Systems Ltd.
peter@memex.co.uk			East Kilbride, Scotland

ted@mitre-bedford.ARPA (Edward J. Ede) (07/18/88)

In article <113@memex.co.uk> peter@memex.co.uk (Peter Ilieve) writes:
>Does anyone know how to download an Adobe PostScript font from a Unix
>machine?
>
>Adobe only seem to sell fonts in Mac or PC format. I want to store the
>font on one of our Unix machines and download it from there, as part
>of a "TeX using PostScript fonts" system. I know that the font must be a
>PostScript program and as I thought that the PC files would be easier
>to understand than the Mac I bought a PC font.
>
>Peter Ilieve				Memex Information Systems Ltd.
>peter@memex.co.uk			East Kilbride, Scotland

This is a re-post of a past message I posted.  We bought the fonts in
Mac format so this may or mat not help.

I wanted to download fonts from our VAX running VMS and got the same
run-around from Adobe.  Their technical support was less than helpful,
saying "We do not support that environment", and they offered to return
our money.  I then spoke with a friend who had a copy of Adobe's
internal document "Supporting Downloadable PostScript Fonts" (G. Reid
8/14/87).  It contains info on how to manage multiple fonts (they eat
a lot of memory) and the format of the font file.

The new Adobe fonts are stored on disk in a part-binary/part-ascii
format.  They need to be converted to full ascii to be downloaded to a
PS printer.

The data for the font is (generally) kept in the resource fork of the
file.  The resources are of type 'POST' and their ids begin with 501
and increse by 1.  The first (16 bit) word of each resource is a tag.
The rest of the resource is the data.  The tag can have the following
6 values.

Value    Description
-----    -----------
  0  	 Comment (can be ignored)
  1	 ASCII text (Just copy the rest of the resource, less the tag,
		     to the output file)
  2      Binary, eight-bit data.  (rest of resource needs to be hexified**)
  3 	 End of file 
  4      the font is in data fork
  5      End of font.

** To hexify data take an eight bit byte and convert it to its two
hexadecimal characters.  (E.g.  10100001 = 161 = 'A1' = 65||49)
(Note: To keep record lengths manageable, after hexifying 40 bytes into
80 characters, we wrote a carriage return to the file.)

In general, resource 501 is ASCII and contains the font dictionaries.
Resources 502 through 5nn-2 contain binary data (usually 2048 bytes).
Resource 5nn-1 is ASCII and contains a bunch of zeros  (character 48)
and a few line of postscript.  Resource 5nn contains the tag 5.

We wrote a quick and dirty lightspeed pascal program to do this.  (The
hexification code was done in assembler for speed.)  The file uploaded
easily using kermit, and works like a charm.  It takes a while to send
80k of font data at 9600 baud though...

********************************************************************

I can mail the binhexed version of this program if anybody
would like it.  If you're on the arpanet, please give me your host
number. 

You may try hooking a serial line from your PC to your unix system and
capturing data from the PC download program.  Your unix system may
have a problem with line length, and the PC program may expect to hear
responses from the "printer".

Good luck,
Ted

Ted Ede -- ted@mitre-bedford.arpa -- The MITRE Corporation -- Burlington Road  
|        -- Bedford MA, 01730 -- Mail Stop B015 -- (617) 271-2524 --        |
|                   - this line intentionally left blank -                  |
+---------------------------------------------------------------------------+