🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #7316

Re: PostScript font downloading query

#7316
From: Edward J. Ede
Date: Mon, 18 Jul 1988 15:03
77 lines
3970 bytes
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 -                  |
+---------------------------------------------------------------------------+
Technical Details
Message-ID: <36363@linus.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!rutgers!gatech!linus!mbunix!ted
References: <113@memex.co.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!rutgers!gatech!linus!mbunix!ted
From: ted@mitre-bedford.ARPA (Edward J. Ede)
Newsgroups: comp.lang.postscript
Subject: Re: PostScript font downloading query
Message-ID: <36363@linus.UUCP>
Date: 18 Jul 88 15:03:16 GMT
References: <113@memex.co.uk>
Sender: news@linus.UUCP
Reply-To: ted@mbunix (Ede)
Organization: The MITRE Corporation, Bedford, Mass.
Lines: 77