Subject: Re: OT: postscript
To: None <netbsd-users@netbsd.org>
From: Christoph Kaegi <kgc@zhwin.ch>
List: netbsd-users
Date: 08/27/2002 07:48:29
On 2002.08.26 21:23, Wojciech Puchar wrote:
> can someone point be to docs about postscript programming?
>
> or exactly how to embed .pfb/.pfa fonts in .ps files...
>
I'm doing it this way:
-------------------------------------- 8< --------------------------------------
#define FONTFILES {"tahoma.pfa", "tahomab.pfa"} /* Font files to load */
...
/*----------------------------------------------------------*/
/* print PS Header: */
/*----------------------------------------------------------*/
fprintf(stdout, "%%!PS-Adobe-2.0\n");
/*--------------------------------------------------------------------*/
/* open and cat FontFiles first */
/*--------------------------------------------------------------------*/
for (i=0; i<FONTFILECOUNT; i++) {
if ( (FONT = fopen(FontFiles[i], "r")) == NULL )
fprintf(stderr, "%s: Could not open %s, proceeding anyway.\n", argv[0], FontFiles[i]);
else
while ( fgets(fontbuf, BUFSIZ, FONT) != NULL)
fprintf(stdout, "%s", fontbuf);
}
-------------------------------------- 8< --------------------------------------
Then, actual Postscript output can will printed.
I got the docs from
http://partners.adobe.com/asn/developer/technotes/postscript.html
Hope this helps
Chris
--
----------------------------------------------------------------------
Christoph Kaegi kgc@zhwin.ch
----------------------------------------------------------------------