home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / source / untype.zoo / untype1 / README < prev    next >
Encoding:
Text File  |  1990-11-22  |  3.6 KB  |  80 lines

  1. untype1 - Adobe Type 1 Font Decryption
  2.  
  3. Chris B. Sears
  4. Digital Equipment, WSE
  5. May 31, 1990
  6.  
  7. These utilities decrypt an Adobe Type 1 font and leave a raw PostScript
  8. file as
  9. a result.  Most of this procedure is documented in "Adobe Type 1 Font Format"
  10. available from Adobe Systems.
  11.  
  12. Converting a Type 1 font program into the outlines is done in two phases.
  13. It assumes that you have a Macintosh, a Unix system and Display Postscript.
  14. I haven't tried using NeWS, GhostScript or a LaserWriter, but they'd probably
  15. work as well.  The PostScript that I use is pretty simple, but the
  16. implementation limits of other systems may break this.
  17.  
  18. 1. Using un-adobe, which is in hqx format, convert the Type 1 font into
  19.    a eexec encoded text file.  Un-adobe.hqx was snarfed off of SUMEX.
  20.    I can't remember who wrote it but you can find that out when you run
  21.    the program.
  22. 2. Using untype1, a shell script driver, convert the results into a list
  23.    of simple PostScript programs.
  24.  
  25. Here is a description of the files in this directory:
  26.  
  27.     untype1: a shell script that uses eexec, chars and DPStest to take
  28.         an ASCII PostScript PostScript file with an encrypted Adobe Type 1
  29.         font and generate raw PostScript for the font
  30.     Makefile: a make(1) description file for compiling exec.c and chars.c
  31.     eexec.c: decrypts a font file encrypted for the eexec operator
  32.     chars.c: decrypts a font file of encrypted CharStrings.  chars couldn't
  33.         easily be written to accept standard input because it repositions
  34.         itself with fseek() after a charstring has been decrypted.
  35.     header.ps: a PostScript wrapper that removes font hints, squashes
  36.         procedures and transforms operators and operands
  37.     trailer.ps: a PostScript wrapper to send the filtered PostScript to the
  38.         standard output
  39.     un-adobe.hqx: a Macintosh application that converts an Adobe PostScript
  40.         font into an ASCII file for transfer to a UNIX system
  41.     view_pre.ps and view_post.ps:  After converting a Type-1 file, these
  42.         files can be used for viewing the results with Display PostScript.
  43.  
  44. To decrypt a Type 1 font first transform the Adobe font file into a text file
  45. on a Macintosh.  This can be done with the Macintosh program in unadobe.hqx
  46. written by Jerry Keough and Ted Ede at Mitre Corporation.  Next transfer the
  47. encrypted PostScript file from the Macintosh to your UNIX system with a file
  48. transfer utility like NCSA Telnet or Kermit.  Be sure to transfer this file
  49. in text mode and *not* binary mode).  Once the font file is on your UNIX
  50. system, you can perform the decryption with the shell script untype1.
  51.  
  52. untype1 is basically three pass: it runs eexec and chars, wraps the output
  53. with header.ps and trailer.ps and then runs it through Display PostScript.
  54. To interact with Display PostScript we use dpstest(1X) found in
  55. /usr/examples/dps/dpstest in the Ultrix release.  The result is a very simple
  56. PostScript file containing only:
  57.  
  58.     /characterName
  59.     closepath
  60.     curveto
  61.     lineto
  62.     moveto
  63.     def
  64.     { }
  65.  
  66. view_pre.ps and view_post.ps are useful for displaying the font using
  67. Display PostScript. Concatenate view_pre.ps, the font file and
  68. view_post.ps together.  The results can be viewed with DPS.
  69.  
  70. November 9, 1990
  71.  
  72. StoneSerif used " |- " rather than " RD " to read the encrypted charstrings.
  73. I Added some notes to this document.
  74. There is a bug with seac where the x origin of accented characters is wrong.
  75. Renamed the shell script transform to untype1.
  76. The header.ps and trailer.ps files were substantially revised to use the
  77. pathforall operator.  This resulted in much simple code and the resulting
  78. PostScript output was much simpler still.  Used bind def.  Save those cycles.
  79. You may want to use flattenpath as well.
  80.