I like to write Perl scripts which generate Postscript pictures. It gives me better interactivity of Perl development combined with the exactness of the results of Postscript.
The end result is usually a PDF file.
Still I've never learned to embed external fonts in my scripts, does anybody have some straightforward text about that part? As far as I know I'm legally 100% clean if I manage to use any font as long as I only distribute the PDF at the end.
It's been a long time since, but as far as I remember it basically boils down to pasting the pfa into your file (pfb2pfa is your friend here).
And it totally is a murky legal situation, many fonts don't allow embedding into a pdf, and you may not use almost all fonts in any way at all if you do not have a valid license. Fonts in the abstract may or may not be copyrightable depending on where you live, but the actual pfa-code you put in your file and the representation generated from that when converting to PDF definitely are.
You might want to try cairo for that instead. It has PS and PDF backends which are pretty direct (see the bottom of this page http://cairographics.org/documentation/using_the_postscript_...), and it'll take care of font subsetting and embedding for you, if that font allows it.
You need the T1ASCII utility to convert your binary Type1 PS Font to a Type3 ASCII font. You can then embed the font as a PS resource and call it from within your PS file as you would normally.
T1Utils is the package and can be found from your repository or synaptic. There's also a DOS version and it comes with its c code.
The end result is usually a PDF file.
Still I've never learned to embed external fonts in my scripts, does anybody have some straightforward text about that part? As far as I know I'm legally 100% clean if I manage to use any font as long as I only distribute the PDF at the end.