Live data from Hacker News

Why “direct” PostScript makes sense

anastigmatix.net

11–20 of 28 posts

Re: Why “direct” PostScript makes sense

#11
post #6

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.

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…

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.

Re: Why “direct” PostScript makes sense

#12
post #8

PDF displaced Postscript for two reasons: (i) lower resource usage, and (ii) better handling of fonts. Since then PDF has become more sophisticated, handling metadata, tagging, and embedding media. It's been a long time since Postscript has been "the universal language for graphical and printed work". A shame, since Postscript is fun.

"It's been a long time since Postscript has been "the universal language for graphical and printed work""

That's actually not true. There's LOTS of PS files in workflows in commercial printing -- I know because I write software for the print industry.

Its true PDF is often replacing the PS file but these are NOT without their own set of problems.

Re: Why “direct” PostScript makes sense

#13
Since we're all admitting to have done this at one point in the past, here's mine; PSTab, a guitar tablature typesetter I wrote in 1994. The code is...not great. http://www.ctan.org/tex-archive/support/pstab

I heard from a guy in NZ a while after that he'd used it to typeset a book of banjo music - it was the only software he could find that supported anything other than 6 strings.

Re: Why “direct” PostScript makes sense

#14
post #6

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.

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…

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

#15
post #8

PDF displaced Postscript for two reasons: (i) lower resource usage, and (ii) better handling of fonts. Since then PDF has become more sophisticated, handling metadata, tagging, and embedding media. It's been a long time since Postscript has been "the universal language for graphical and printed work". A shame, since Postscript is fun.

re: "PDF displaced Postscript."

Not exactly. A PDF is generated from PostScript, as noted in the article:

"A PDF file is a static representation of the result of executing the PostScript file on a single occasion."

A PDF is a more compact version of a PostScript file - we could call it compiled PostScript, to use a term many on this site are familiar with. Just as a compiler has many output options, distilling PostScript can result in many different file sizes and levels of quality. (Check out the Distiller output settings.)

Re: Why “direct” PostScript makes sense

#19
My first job out of college, I had a Turbo C compiler, a DEC PC, a database app (government) written in Foxbase, and a Postscript printer. No real reporting tools, so all my reports and add-ons were written in C and outputted Postscript directly to the printer. Was a very interesting learning experience.

The Blue and Green books are a must for a new Postscript programmer http://partners.adobe.com/public/developer/ps/sdk/index_arch...

Re: Why “direct” PostScript makes sense

#20
A few years ago I took a look at this Unix circuit schematic editor, which seems to be still going strong. Symbols are kept directly in Postscript, if memory serves.

http://opencircuitdesign.com/xcircuit/ : "XCircuit regards circuits as inherently hierarchical, and writes both hierarchical PostScript output and hierarchical SPICE netlists."

Post reply on HN