Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to embed fonts in raw PostScript

Status
Not open for further replies.

tomto66

Programmer
Jun 8, 2005
2
BE
Hi,

I am looking for a simple example on how to embed a postscript font (a barcode font, for that matter) into a postscript file. I am working on a program that outputs PS directly - no tools used. So every postscript statement is generated by our program. I know fonts are basically dictionaries. But, given a postscript font file (the raw fontfile itself) I am trying to figure out what to take from that fontfile, and how to code it in postscript.

Anyone any ideas? I did google this for a couple of days, but (till now) can't find code examples. As far as I can see there is no example in the bluebook either (or I missed it).

Anyone that can provide an example, or point my nose to where I can find one? I would be very grateful.

Cheers & thanks,

Tom
 
Take the .PFB file of your font, and convert it to PFA. You can write a program to do this, or search for utilities (I think GhostScript used to come with a PostScript program to do it).

Then simply include the contents of the entire .PFA file at the top of your PostScript program. Nothing else is required.

PFB is PostScript Font Binary, and PFA is PostScript Font ASCII.



Thomas D. Greer

Providing PostScript & PDF
Training, Development & Consulting
 
Hey thanks - gotta try this.

Cheers,

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top