🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.lang.postscript
Article #984

Re: Question about Type1 font for OW3.0

#984
From: Kazuhiro Kazama
Date: Fri, 03 Apr 1992 13:20
104 lines
5627 bytes
$@Iw4V!w#N#T#T%=%U%H8&$G$9!#(J

In article <HASHI.92Mar30211037@dragon.tds.co.jp> hashi@dragon.tds.co.jp (HASHIZUME Takashi) writes:
 > $@$3$N(Juntype1$@$O$I$N$h$&$K$9$l$PF~<j$G$-$k$N$+65$($F$$$?$@$1$^$;$s$+(J?
 > $@$^$?$b$7%U%j!<$J%=%U%H$G$*;}$A$NJ}$,$$$^(J$@$7$?$i$$$?$@$-$?$$$N$G$9$,!#(J

$@!!(Jfj.lang.postscript$@!"$=$7$F3N$+(Jfj.sources.misc$@$K$bEj9F$5$l$F$$$^$7$?!#(J
$@:G8e$K(JREADME$@$rIU$1$F$*$-$^$9!#(J

$@!!$=$7$F!"$3$NB>$K$3$l$N2~NIHG$H;W$o$l$k(Juntype1.c$@$b%]%9%H$5$l$F$$$^$7(J
$@$?!#<B$O!"$3$l$O:#5$$,IU$-$^$7$?(J:-P$@$3$A$i$O;H$C$?$3$H$,$"$j$^$;$s!#(J

	From: kevin@kosman.UUCP (Kevin O'Gorman)
	Date: 3 Dec 90 23:59:16 GMT
	Message-ID: <1270@kosman.UUCP>
	Subject: Untype1.c program -- a pipeline, more portable version

$@!!$3$N;~4|$N(Jcomp.sources.misc$@$N%"!<%+%$%V$G$bC5$7$F$_$F!"$b$7<j85(J$@$K$J(J
$@$$$h$&$J$i%a!<%k$r$/$l$l$PN>J}$H$bAw$j$^$9!#(J

--- README ---
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.
--
	$@Iw4V0lMN(J (kazama@square.ntt.jp)
	NTT$@%=%U%H%&%'%"8&5f=j(J $@%=%U%H%&%'%"4pAC5;=Q8&5fIt(J
	$@J,;67?%=%U%H%&%'%"8&5f%0%k!<(J$@%W(J
Technical Details
Message-ID: <282102@nttlab.ntt.JP>
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!sh.wide!wnoc-tyo-news!dclsic!hamamatsu-pc.ac.jp!shzkgw!nttlab!kazama
References: <KKURI.92Mar26175207@franken.prompt.co.jp> <279889@nttlab.ntt.JP> <HASHI.92Mar30211037@dragon.tds.co.jp>

Show Full Headers
Complete Article Headers
X-Google-Language: Japanese,JIS
X-Google-Thread: fa2ca,c1d7c114cb0f79db
X-Google-Attributes: gidfa2ca,public
X-Google-ArrivalTime: 1992-04-03 05:20:38 PST
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!sh.wide!wnoc-tyo-news!dclsic!hamamatsu-pc.ac.jp!shzkgw!nttlab!kazama
From: kazama@square.ntt.jp (Kazuhiro Kazama)
Newsgroups: fj.lang.postscript
Subject: Re: Question about Type1 font for OW3.0
Message-ID: <282102@nttlab.ntt.JP>
Date: 3 Apr 92 13:20:38 GMT
References: <KKURI.92Mar26175207@franken.prompt.co.jp> <279889@nttlab.ntt.JP>
 <HASHI.92Mar30211037@dragon.tds.co.jp>
Sender: news@nttlab.ntt.JP
Followup-To: fj.lang.postscript
Distribution: fj
Organization: NTT Software Laboratories, Tokyo, Japan.
Lines: 104
In-reply-to: hashi@dragon.tds.co.jp's message of 30 Mar 1992 21:10:37 JST