🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #7917

Re: LaserWriter II fonts -- HELP

#7917
From: Glenn Reid
Date: Thu, 02 Feb 1989 20:19
56 lines
2674 bytes
>How is the disks formatted? Do you for example format them by a Mac
>and then just connect?
>Can the harddisk be considered as a huge RAM for the LaserWriter?
>If not, what is the "format" of the disk-files and what PostScript
>routines searches the disk for certain files?

>If anyone has got the "Real-World PostScript"-book, can you please
>give an example of the stuff mentioned above?
>Where can I get the book "Real-World PostScript"? Publisher?

The PostScript interpreter has lots of operators for dealing with the
file system.  The one you want for determing what fonts are on the disk
is "filenameforall".  It takes a pattern string to match file names,
and loops through all matching files:

	% not tested, but I believe it will work.
	/scratch 128 string def
	/Times-Roman findfont 12 scalefont setfont
	36 756 moveto
	/newline {
	    currentpoint 14 sub exch pop 36 exch moveto
	    currentpoint exch pop 36 lt {
		gsave showpage grestore 36 756 moveto
	    } if
	} bind def
	(fonts/*) { %filenameforall
	    dup == flush		% send font name back to host
	    6 1 index length 6 sub getinterval show
					% print the string on the page
	    newline			% move down on the page
	} scratch filenameforall
	showpage

The disk is not really virtual memory for the RAM in the printer, but
part of it is used by the system memory use like the font cache, the
display lists, etc.  You can create and use your own files on the
printer easily enough.  Most of the necessary operators are documented
in the "Red Book" (except how to delete them, which is worth knowing):

	file		read		write
	readstring	writestring	closefile
	readline	writeline	deletefile
	status		...

The "deletefile" and "status" operators are not in printers which do
not contain a disk, so be careful when you use it.  The others are,
although you will not be able to open a file with the "file" operator
if there is no disk.

The Adobe "Green Book" has a section on file operations, and there is a
sample program for writing a font file to the disk (which can then be
discovered by "findfont").

Have fun,
Glenn Reid
Adobe Systems
Technical Details
Message-ID: <395@adobe.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!decwrl!adobe!greid
References: <771@draken.nada.kth.se> <2198@scolex.sco.COM> <784@draken.nada.kth.se>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!decwrl!adobe!greid
From: greid@adobe.com (Glenn Reid)
Newsgroups: comp.lang.postscript
Subject: Re: LaserWriter II fonts -- HELP
Keywords: PostScript, LaserWriter, Hard disk
Message-ID: <395@adobe.UUCP>
Date: 2 Feb 89 20:19:51 GMT
References: <771@draken.nada.kth.se> <2198@scolex.sco.COM> <784@draken.nada.kth.se>
Sender: news@adobe.COM
Reply-To: greid@adobe.COM (Glenn Reid)
Organization: Adobe Systems Incorporated, Mountain View
Lines: 56