bi38@sdcc12.ucsd.EDU (Macbeth Ylr) (01/26/89)
I have a LaserWriter II (nt). I notice in the manual there are several fonts such as ITC Zapf Chancery, etc. I would like to access them from a postscript program. What are they really called? I try /ITC-Zapf-Chancery findfont but just end up with the default. Anyone out there know what I'm doing wrong or what the real names of these fonts are for postscript Thanks Jude Poole jpoole@ucsd.edu jpoole@ucsd.BITNET
jim@nih-csl.UUCP (jim sullivan) (01/26/89)
In article <1058@sdcc12.ucsd.EDU> bi38@sdcc12.ucsd.EDU (Macbeth Ylr) writes: >I have a LaserWriter II (nt). I notice in the manual there are >several fonts such as ITC Zapf Chancery, etc. I would like to >access them from a postscript program. What are they really called? >I try : >/ITC-Zapf-Chancery findfont >but just end up with the default. > >Anyone out there know what I'm doing wrong or what the real names >of these fonts are for postscript Here is a postscript routine to print all the font names in your printer. Just send it directly to your printer. --------------------------- cut here --------------------------- %! %% Get all font names in the printer and print them out. /Helvetica findfont 10 scalefont setfont /fontname 30 string def 50 750 translate FontDirectory {0 0 moveto pop fontname cvs show 0 -10 translate} forall showpage --------------------------- cut here ----------------------------- This of course assumes that your printer has the font Helvetica, which all postscript printers I know of have. It also assumes that the font names are less than thirty characters in length. Good Luck... Jim
ulfis@nada.kth.se (Anders Ulfheden) (01/27/89)
In article <1058@sdcc12.ucsd.EDU> bi38@sdcc12.ucsd.EDU (Macbeth Ylr) writes: >I have a LaserWriter II (nt). I notice in the manual there are >several fonts such as ITC Zapf Chancery, etc. I would like to >access them from a postscript program. What are they really called? -----------Cut here ------------------------------------------------------ %! % FontList.ps : list all defined fonts onto printer % Send this file to LaserWriter with LW Dwnload program to print listing % % Copyright (c) 1988 Anders Ulfheden <ulfis@nada.kth.se> % % This program may be copied, modified and redistributed for non-commercial % use only, provided that any and all copyright notices are preserved. % % Please report bugs, fixes, improvements and suggestions to: % % UUCP: ulfis@nada.kth.se % % /MaxNrOfFonts 50 def % Maximum numbers of fonts... /Xpos 136 def /Ypos 690 def /num 0 def % local counter /incr { /num num 1 add def } def /s40 { 40 string } def % Proper length of the fontname /showline { % Show and newlines show newline } def /newline { % Spacing between lines /Ypos Ypos 12 sub def Xpos Ypos moveto } def /CountFonts { % Count the fonts and put the names into array FontDirectory { pop s40 cvs incr } forall /FontArray num array def FontArray astore pop } def /ListFonts { % Sort the fonts and show them on paper Bubbelsort FontArray { showline } forall } def /Bubbelsort { % Here is the sorting routine 1 1 num 1 sub { /localcount exch def num 1 sub -1 localcount { /innercount exch def /firststring FontArray innercount 1 sub get def /secondstring FontArray innercount get def firststring secondstring gt { FontArray innercount 1 sub secondstring put FontArray innercount firststring put } if } for } for } def /prettyline { /YPOSition exch def newpath Xpos Ypos YPOSition add moveto Xpos 100 add Ypos YPOSition add lineto stroke } def /Times-Roman findfont 12 scalefont setfont 14 prettyline Xpos Ypos 18 add moveto CountFonts (Number of fonts: ) show num s40 cvs show 30 prettyline Xpos Ypos moveto ListFonts newline /Times-Bold findfont 12 scalefont setfont (Total memory: ) show vmstatus s40 cvs show newline (Memory used: ) show s40 cvs show newline pop (Free memory: ) show vmstatus exch sub s40 cvs show newline newline pop /Times-Roman findfont 12 scalefont setfont (From ulfis@nada.kth.se, 89-01-27) show showpage -----------Cut here ------------------------------------------------------ >Thanks Anytime! +------------------------------------------------------------------------------ | Anders Ulfheden | USENET: ulfis@nada.kth.se | Royal Institute of Technology | Stockholm, Sweden
jimi@h-three.UUCP (jimi) (01/27/89)
In article <1058@sdcc12.ucsd.EDU>, bi38@sdcc12.ucsd.EDU (Macbeth Ylr) writes: > I have a LaserWriter II (nt). I notice in the manual there are > several fonts such as ITC Zapf Chancery, etc. I would like to > access them from a postscript program. What are they really called? > > I try > > /ITC-Zapf-Chancery findfont > > but just end up with the default. > > Anyone out there know what I'm doing wrong or what the real names > of these fonts are for postscript Try this: /ZapfChancery-MediumItalic findfont Here's a list of other PostScript font names that happen to be defined in my system. This lists all the standard fonts on 35-font controllers and a few more. Times-Roman Times-Bold Times-Italic Times-BoldItalic Helvetica Helvetica-Oblique Helvetica-Bold Helvetica-Bold Helvetica-BoldOblique Courier Courier-Bold Courier-Oblique Courier-BoldOblique AvantGarde-Book AvantGarde-BookOblique AvantGarde-Demi AvantGarde-DemiOblique Bookman-Light Bookman-LightItalic Bookman-Demi Bookman-DemiItalic Helvetica-Narrow Helvetica-Narrow-Oblique Helvetica-Narrow-Bold Helvetica-Narrow-BoldOblique Helvetica-Black Helvetica-BlackOblique Helvetica-Light Helvetica-LightOblique NewCenturySchlbk-Roman NewCenturySchlbk-Italic NewCenturySchlbk-Bold NewCenturySchlbk-BoldItalic Palatino-Roman Palatino-Bold Palatino-Italic Palatino-BoldItalic ZapfChancery-MediumItalic ZapfDingbats Symbol Helvetica-Outline Times-Outline Italic-Outline -- Jim Ingram uunet!h-three!jimi | jimi%h-three@uunet.uu.net h-three Systems Corporation P.O. Box 12557 RTP NC 27709 919 549 8334
jeff@drexel.UUCP (Jeff White) (01/29/89)
In article <895@nih-csl.UUCP>, jim@nih-csl.UUCP (jim sullivan) writes: > In article <1058@sdcc12.ucsd.EDU> bi38@sdcc12.ucsd.EDU (Macbeth Ylr) writes: > >I have a LaserWriter II (nt). I notice in the manual there are > >several fonts such as ITC Zapf Chancery, etc. I would like to > >access them from a postscript program. What are they really called? > >I try : > Here is a postscript routine to print all the font > names in your printer. Just send it directly to your > printer. I should mention that with the installation disks that come with the LW IInt, there is an application (the name of which escapes me) which allows you to see the names of all the fonts in the printer, as well as print out the list, along with a sample of each. This may be want you need. A warning that whether you use the Mac application or the Postscript code, they take a fair amount of time to run (the Mac version requires a good 10 minutes of processing time on the LW to print out). Jeff White Drexel University - ECE Dept. rutgers!bpa!drexel!jeff
allanh@sco.COM (Allan J. Heim) (01/31/89)
Re: Anders Ulfheden's PostScript program that prints the fonts available on a printer It's a very nice program, but will it find fonts on a hard disk, like on a Varityper VT-600 or Agfa/Compugraphic CG-400PS? I tried running an older version on a VT-600, and it only found ten fonts--not counting the tens of fonts on the hard disk. I believe the new book "Real-World PostScript" mentions an alternative means of searching for fonts. It involves looking for filesystems as well as <the place fonts are usually stored>. -- allanh@sco.COM ...{decvax!microsoft,ucbvax!ucscc,uunet}!sco!allanh "A seven-foot specter of evil appeared in front of the car, so I ran over it. Sounded like a bag of laundry going under. Hope I didn't hurt the tires. Want a fig newton?"
ulfis@nada.kth.se (Anders Ulfheden) (02/02/89)
In article <2198@scolex.sco.COM> allanh@sco.COM (Allan J. Heim) writes: >Re: Anders Ulfheden's PostScript program that prints the fonts available > on a printer > >It's a very nice program, but will it find fonts on a hard disk, like on >a Varityper VT-600 or Agfa/Compugraphic CG-400PS? I tried running an >older version on a VT-600, and it only found ten fonts--not counting the >tens of fonts on the hard disk. No, I don't think the fonts on a hard disk will be found. I'm not familiar with any LaserWriter connected to a harddisk and I haven't yet seen any program including routines for a harddisk-IO. I'm sure that the PostScript file-operators can manage to handle this. One problem is to decide whether a harddisk is connected or not to the LaserWriter, and then get the file-ID (or something) for reading/writing. >I believe the new book "Real-World PostScript" mentions an alternative >means of searching for fonts. It involves looking for filesystems as >well as <the place fonts are usually stored>. 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? Tnx! +------------------------------------------------------------------------------ | Anders Ulfheden | USENET: ulfis@nada.kth.se | Royal Institute of Technology | Stockholm, Sweden
greid@adobe.com (Glenn Reid) (02/03/89)
>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
fryd@g.gp.cs.cmu.edu (Michael Fryd) (02/03/89)
The Linotype series of PostScript imagesetters were the first commercially
available PostScript printer with a hard disk.
The primary extensions to PostScript were:
- a disk file name could be given to the 'file' operator (previously
only things like %stdin and %stdout could be used)
- the operator 'filenameforall' was added which allows the user to provide
a filename containing wildcards, and a procedure, and the procedure
will be executed once for each matching filename.
- the 'findfont' operator was modifed to look on the disk for fonts
if the requested font was not found in FontDirectory.
- the addition of various maintenance operators such as 'initializedisk'
and 'deletefile'
Fonts may be placed on the disk simply by placing them in a file named
font/FONTNAME.
The LaserWriter II NTX has an external SCSI connector to which you can connect
a hard disk. This external disk acts just like the internal disk in a
Linotype, VT600, or ColorScript 100.
The format of these disks is not Macintosh readable. The disk must
be formatted by the PostScript printer. The contents of the disk can only be
read or written via PostScript commands.
The primary purpose of the disk is to hold downloadable fonts, and as
overflow for the font cache and internal display list. Although the disk
does not provide unlimited virtual memory; prologs and other routines may be
stored on the disk and called into memory with a single PostScript command.
The easiest way to test for the existence of a disk is to test to see if
the filenameforall operator is defined.
The following short piece of PostScript is what the Macintosh LaserWriter 5.2
driver uses for determining what fonts are available on a PostScript printer.
It sends a list of fonts back to to the host, one per line, followed by a
line containing just '*'. The fonts are NOT listed in alphabetical order.
This code will work on PostScript printers with or without a hard disk.
save
/scratch 100 string def
FontDirectory{pop = flush}forall
systemdict/filenameforall known
{(fonts/*){dup length 6 sub 6 exch getinterval = flush}
scratch filenameforall
}
if
(*) = flush
restore
and since someone asked. . .
"Real World PostScript"
Edited by Stephen F. Roth
ISBN 0-201-06663-7
Published by Addison-Wesley
first printing: October 1988
Michael Fryd Contributing author, Real World PostScript
MEFCO, Inc. AppleLink: MEFCO
2401 Coulter Road AT&T: (412) 751-5557
McKeesport, PA 15131 ARPA: Michael.Fryd@cs.cmu.edu
--