home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_2.iso
/
files
/
666b.lha
/
PSDownload
/
PSDownload.doc
< prev
next >
Wrap
Text File
|
1992-08-17
|
4KB
|
115 lines
PSDownload
----------
A PostScript font download utility, which also has the ability to
disassemble the contents of a Type-1 font.
(c) Mike Todd, 1992
compuserve: 70117,634
CIX: miketodd
May be freely distributed only on a private or club basis, except where
explicit permission is granted. No charge may be made for this software,
except for normal online charges in the case of online systems, and the cost
of the disk in the case of floppy distribution. This software may not be
included on CDs, (including PD compilations), commercial disks or other
media without explicit permission, which will not normally be withheld.
USAGE:
PSDownload [>device|file] [-d|f] FontFile
-f do not make font resident (used for file output)
-d disasssemble the font
eg:
PSDownload >par: FontName.PFB download FontName to PAR printer
PSDownload >file -d FontName.PFB disassemble font to file
Font downloading
----------------
PostScript fonts come in two flavours, Type-1 and Type-3 and, in
most cases will be included in a PostScript document for sending to
a printer. However, there are times when it would be useful to have
the font resident in the printer.
To do this, you need to get out of the PostScript interpreter's
main server, store the font and then get back to normal operations.
In addition, PostScript Type-1 fonts are sometimes subject to a
simple compression technique which converts the middle section of
hex codes into binary (thus reducing the number of bytes by 50%)
and this section must be expanded.
PSdownload will do this for you, by simply executing the command:
PSDownload >PAR: medici.pfb
the medici.pfb file will be downloaded to the PostScript printer
on the parallel port. The output doesn't have to go to the parallel
port, it can be redirected to a file or to the serial port if required.
Disassembling
-------------
Type-1 fonts have a complicated middle section which consists of
code written in a subset of the PostScript language which has been
pre-compiled. Part of it is then encrypted, and then the whole lot
is encrypted.
This makes life very difficult if you're trying to work out why a font
doesn't work under particular circumstances.
Therefore, I wrote this font disassembler program to allow me to look
at this code.
It produces readable ASCII output, but purely for private study ... the
code cannot be read by a PostScript interpreter, nor is it possible to
recompile the output (but I'm working on it!)
Disassembly is invoked by using the -D command line switch:
PSDownload >medici.txt -D medici.pfb
Note that PSDownload will disassemble most variety of Type-1 code,
including decompressed code (as produced by itself). However, it will
not handle Type-1 code in anything other than Amiga or PC file formats,
and will not disassemble some fonts which are actually encrypted Type-3
code (since the encryption is often unique to the font).
Switches
--------
There are only two command line switches:
-F will decompress the file but will not include the start and end
sequences required for the download to `stick' in the printer.
This can be used to create decompressed Type-1 fonts for other
applications, or where a different downloading method is required.
-D will create a disassembly of the font (and takes precedence over
the -F switch)
Disclaimer
----------
This utility was written for my own investigations into PostScript Type-1
font failures. It has served its purpose admirably.
However, it has not been thoroughly tested and is provided on an as-is basis.
Having said that, I would be pleased to hear of any problems with the
program.
Version History
---------------
v1.0 01aug92 First public release