News for hackers. Stuff that matters.
Re:Why “direct” PostScript makes sense by Craiggybear on Friday December 09, 2011 @05:48AM (#3333304)
I like hand-coding PostScript. Been doing it since the early 90's. It doesn't need to be a mess and can be beautifully concise and clean. It does have some odd ideas for the beginner (the page always starts at the bottom left coordinate and goes up, not down) but that's not hard.

Its a very cool language -- Forth derived.

Re:Why “direct” PostScript makes sense by mhd on Friday December 09, 2011 @06:14AM (#3333342)
I remember back in the days of "early" Linux, when printer drivers were still a bit rare, there was lots of software that generated somewhat readable PS, i.e. the programmers wrote it and then used it as a template, like you'd be using HTML templates nowadays. The timetables for a German railway info site did that.

And I made heavy use of Jamie Zawinski's audio-tape.ps [1] back then. Never got through Thinking in PostScript [2] completely, though…

1: http://www.jwz.org/hacks/audio-tape.ps

2: http://wwwcdf.pd.infn.it/localdoc/tips.pdf

Re:Why “direct” PostScript makes sense by salvadors on Friday December 09, 2011 @12:19PM (#3334523)
Wow. I'd completely forgotten about audio-tape.ps. It had all sorts of nifty built-in graphics for various bands, and I remember learning way more than I ever expected to want to know about PostScript adding similar customisations for others.
Re:Why “direct” PostScript makes sense by acqq on Friday December 09, 2011 @06:10AM (#3333339)
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.

Re:Why “direct” PostScript makes sense by fhars on Friday December 09, 2011 @06:33AM (#3333377)
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.

Re:Why “direct” PostScript makes sense by bazzargh on Friday December 09, 2011 @08:12AM (#3333559)
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.
Re:Why “direct” PostScript makes sense by Craiggybear on Friday December 09, 2011 @07:49AM (#3333521)
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.