home *** CD-ROM | disk | FTP | other *** search
- untype1 - Adobe Type 1 Font Decryption
-
- Chris B. Sears
- Digital Equipment, WSE
- May 31, 1990
-
- These utilities decrypt an Adobe Type 1 font and leave a raw PostScript
- file as
- a result. Most of this procedure is documented in "Adobe Type 1 Font Format"
- available from Adobe Systems.
-
- Converting a Type 1 font program into the outlines is done in two phases.
- It assumes that you have a Macintosh, a Unix system and Display Postscript.
- I haven't tried using NeWS, GhostScript or a LaserWriter, but they'd probably
- work as well. The PostScript that I use is pretty simple, but the
- implementation limits of other systems may break this.
-
- 1. Using un-adobe, which is in hqx format, convert the Type 1 font into
- a eexec encoded text file. Un-adobe.hqx was snarfed off of SUMEX.
- I can't remember who wrote it but you can find that out when you run
- the program.
- 2. Using untype1, a shell script driver, convert the results into a list
- of simple PostScript programs.
-
- Here is a description of the files in this directory:
-
- untype1: a shell script that uses eexec, chars and DPStest to take
- an ASCII PostScript PostScript file with an encrypted Adobe Type 1
- font and generate raw PostScript for the font
- Makefile: a make(1) description file for compiling exec.c and chars.c
- eexec.c: decrypts a font file encrypted for the eexec operator
- chars.c: decrypts a font file of encrypted CharStrings. chars couldn't
- easily be written to accept standard input because it repositions
- itself with fseek() after a charstring has been decrypted.
- header.ps: a PostScript wrapper that removes font hints, squashes
- procedures and transforms operators and operands
- trailer.ps: a PostScript wrapper to send the filtered PostScript to the
- standard output
- un-adobe.hqx: a Macintosh application that converts an Adobe PostScript
- font into an ASCII file for transfer to a UNIX system
- view_pre.ps and view_post.ps: After converting a Type-1 file, these
- files can be used for viewing the results with Display PostScript.
-
- To decrypt a Type 1 font first transform the Adobe font file into a text file
- on a Macintosh. This can be done with the Macintosh program in unadobe.hqx
- written by Jerry Keough and Ted Ede at Mitre Corporation. Next transfer the
- encrypted PostScript file from the Macintosh to your UNIX system with a file
- transfer utility like NCSA Telnet or Kermit. Be sure to transfer this file
- in text mode and *not* binary mode). Once the font file is on your UNIX
- system, you can perform the decryption with the shell script untype1.
-
- untype1 is basically three pass: it runs eexec and chars, wraps the output
- with header.ps and trailer.ps and then runs it through Display PostScript.
- To interact with Display PostScript we use dpstest(1X) found in
- /usr/examples/dps/dpstest in the Ultrix release. The result is a very simple
- PostScript file containing only:
-
- /characterName
- closepath
- curveto
- lineto
- moveto
- def
- { }
-
- view_pre.ps and view_post.ps are useful for displaying the font using
- Display PostScript. Concatenate view_pre.ps, the font file and
- view_post.ps together. The results can be viewed with DPS.
-
- November 9, 1990
-
- StoneSerif used " |- " rather than " RD " to read the encrypted charstrings.
- I Added some notes to this document.
- There is a bug with seac where the x origin of accented characters is wrong.
- Renamed the shell script transform to untype1.
- The header.ps and trailer.ps files were substantially revised to use the
- pathforall operator. This resulted in much simple code and the resulting
- PostScript output was much simpler still. Used bind def. Save those cycles.
- You may want to use flattenpath as well.
-